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 -- http://mail.python.org/mailman/listinfo/python-list