On Thu, 24 Jul 2014 01:30:41 +0000, Steven D'Aprano wrote: > I wonder whether I ought to use atexit to register the function, rather > than mess with sys.excepthook directly? Ignore this. I was smoking crack. atexit has nothing to do with sys.excepthook and won't solve my problem. -- Steven