[Baypiggies] How to tell if sys.excepthook has already been overridden?

Paul McNett p at ulmcnett.com
Thu Mar 19 22:39:37 CET 2009


Is there a general way to tell if sys.excepthook has been overridden already or not? 
I want to override it in my library, but only if it hasn't already been overridden by 
some other library or end-application code.

I notice these differences on Python 2.5.4 Mac versus Ubuntu:

 >>> print sys.excepthook.__module__

 >>> print sys.excepthook.__module__


More information about the Baypiggies mailing list