Stop Python from exiting upon error in Windows

Peter Hansen peter at
Tue Jul 15 04:50:18 CEST 2003

Tom Plunket wrote:
> Or- catch the error in your mainline, and do a sys.raw_input()
> call on exception.

Tom meant just "raw_input()", which is a builtin, rather than 
sys.raw_input which does not exist, of course.

To answer your question in the other reply, yes, you can
nest exceptions.  If you have a try/except and the raw_input
in the except, however, you won't see any exception traceback
printed at the console so you'll need something like the
traceback module and one of the functions from it, like


More information about the Python-list mailing list