Traceback of hanged process

Jonathan Curran jonc at icicled.net
Sun Jan 7 00:39:26 CET 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