John Salerno wrote:
> 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()Hmm, looks like this doesn't work anyway if open() doesn't work, because then f.close() raises an UnboundLocalError for obvious reasons. -- http://mail.python.org/mailman/listinfo/python-list
