Traceback of hanged process

Jonathan Curran jonc at icicled.net
Sat Jan 6 18:39:26 EST 2007


Heh, I kinda messed up the code there. It should be:

import sys

log_file = open('errors.log', 'w')
sys.stderr = log_file

<your code>

log_file.close()

As for the Ctrl-C, you can catch that when KeyboardInterrupt exception is 
raised.

- Jonathan



More information about the Python-list mailing list