Exception Handling

michael montagne montagne at boora.com
Wed May 9 16:05:33 EDT 2001


Three questions:
1.      How do I break out of a running program?  similar to Ctrl-Break in
VBA.
2.      In the except: part of a try/except statement, what is the best way
to print out the error?
3.      Most troubling.  I have been working on a program to transfer some
data form an Outlook folder to a database.  I have a number of try/except
statements, each of which does not specify a specific error so all should be
caught.  When I run the code in the interactive window, the exceptions are
caught and the program goes through to the end.  But when I make a shortcut
and put it on my desktop (winNT)  ot start the program, I end up hitting an
error and the program stops.  I'm not sure what the error is (see question
#2), but why is the behavior so different than the interactive window?

-mjm





More information about the Python-list mailing list