def create_sql_script(self):
try:
with open('labtables.sql') as sql_script:
return sql_script.read()
except IOError:
wx.MessageBox('Could not locate the file "labtables.sql"',
'File Not Found')
OR
def create_sql_script(self):
try:
f = open('labtables.sql')
sql_script = f.read()
except IOError:
wx.MessageBox('Could not locate the file "labtables.sql"',
'File Not Found')
finally:
f.close()
Do they both do the same thing?
--
http://mail.python.org/mailman/listinfo/python-list
