Problem overriding sys.excepthook

Lunchtimemama lunchtimemama at gmail.com
Mon Jan 2 03:40:12 EST 2006


Thank you for a fine explanation Pat, that clears things up very
nicely. I have one remaining question which I imagine amounts to taste.
What is the superior method of exception handling:

A) To, as you suggest above, import the code as a module from within a
program with special exception handling code.

or

B) To pipe sys.stderr to a file and keep the OS on the lookout for a
non-zero errorlevel (via a batch file or some such) and then launch
another Python script to further handle the error output.

My goal is to upload error reports to a server. My criteria for
preference are first performance and second conformance with Python
style. Any overwhelming opinion or alternative solution? Thanks again.




More information about the Python-list mailing list