Exceptions
DavidPorterHolt
DavidPorterHolt at acm.org
Tue Feb 21 11:48:45 EST 2006
Here's the same clip, but run in the command line interpreter. The
error gives a little more info.
>>> try:
... fsock = open('/notthere')
... except IOError:
... print 'The file does not exist, exiting gracefully'
... print 'This line will always print'
File "<stdin>", line 5
print 'This line will always print'
^
SyntaxError: invalid syntax
>>>
Thanks,
David Holt
DavidPorterHolt at acm.org
More information about the Python-list
mailing list