Stop Python from exiting upon error in Windows

Robert at Robert at
Tue Jul 15 04:28:56 CEST 2003

Can you nest exceptions? I already have a few legitimate try/except blocks
where I know there's a chance the act could go bad, do I just stick a try:
at the beginning of the whole body of code and an except: at the end?

- Robert

"Tom Plunket" <tomas at> wrote in message
news:n2o6hvcahk7dlmn9t26tvis8umnfg1tdeo at
> Robert wrote:
> > How can I stop the Python interpreter from exiting when an error occurs?
> create a batchfile, tell Windows that the association of Python
> files is to that batch file, and put this in the file:
> python.exe %1
> pause
> Or- catch the error in your mainline, and do a sys.raw_input()
> call on exception.
> -tom!

More information about the Python-list mailing list