sys.excepthook and threads

Dr. Peer Griebel griebel at konzept-is.de
Thu Apr 12 11:56:03 CEST 2007


ian schrieb:
 > Hi,
 >
 > sys.excepthook don't work if an exception come in a thread...
 > It's normal or its a bug ? There are any tip ? look here :
 > http://spyced.blogspot.com/2005_06_01_archive.html
 >
 > Thx

I think sys.excepthook is a thread local variable.  This means the
variable has to be set by the thread for which it should be active.

You did set sys.excepthook in your main thread. This setting is not
propagated to your newly created thread.

This is my observation...

Peer




More information about the Python-list mailing list