<div dir="ltr"><div dir="ltr">Hello all,<div><br></div><div>I have a need to execute sql scripts in a file with comments in Python 2.7. </div><div>here is m code snippet:</div><div dir="ltr"><br></div>sqlF = r'{}\{}'.format(sFldr_sql,sSQLFile)<br>sql_file_contents = open(sqlF,'r').read()<br><div>cur.execute(sql_file_contents)</div><div> </div><div>the file can be executed from pgAdmin successfully. However, the code above runs quietly without any issues raised but NO results was worked out.</div><div><br></div><div>In the sql file, there are scripts to DROP
FUNCTION IF EXISTS and CREATE OR REPLACE FUNCTION.</div><div><br></div><div>Your input to shed light on it would be much appreciated.</div><div><br></div><div>Thank you</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><span style="font-family:arial,sans-serif;font-size:12.5px;border-collapse:collapse;color:rgb(136,136,136)"><div><span style="color:rgb(102,102,102);font-family:Verdana,Arial,Tahoma;line-height:20px;border-collapse:separate">Yours sincerely,</span></div><div><br></div><div><br></div><div>John Zhang</div><br><div><br></div></span></div></div>