Stop Python from exiting upon error in Windows

Tom Plunket tomas at fancy.org
Tue Jul 15 04:06:14 CEST 2003


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