This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dthiede
Recipients
Date 2002-10-05.17:44:20
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=427491

There is no indication of a callback hook in the Thread
class. The source for threading.py shows a _print_exc handle
that I had tested. It is possible to override the name and
get most of the desired behaviour but there are problems.
The following code is from threading.__bootstrap()

_print_exc(file=s)
_sys.stderr.write("Exception in thread %s:\n%s\n" %
                       (self.getName(), s.getvalue()))

This still generates some output to standard error which is
not desireable. It is also a global setting which is not
what you implied. Your statement is that "each thread has a
hook" is certainly not apparent. in the code. This API is
also different than what is available globally in the sys
module.except() hook. I also checked the cgitb.py module and
it also does't handle threads, apparently. I realize that
there are other ways to handle intercepting and formatting
excetpion output but the callback scheme was so nice.
History
Date User Action Args
2007-08-23 16:05:50adminlinkissue618633 messages
2007-08-23 16:05:50admincreate