Python Services and excepthook (not working)

Larry Bates lbates at swamisoft.com
Fri Mar 5 12:47:44 EST 2004


In an attempt to catch all exceptions that might
happen in my program, I have set an excepthook
so that I can catch the exception, get the
traceback and log it to a file.  This works like
a charm for "normal" Python programs.  I have
just begun to write Python services and this
methodology doesn't seem to work any more.  It
appears that some other function is taking over
my excepthook and writes the traceback to the
Event Log (not a bad thing, just not what I want).
I would like to get back control so I can log
the exception to my log file (and email a message
to the administrator).

Anybody got an idea how I might accomplish this?

Thanks in advance,
Larry Bates
Syscon, Inc.





More information about the Python-list mailing list