cannot override sys.excepthook
Posted
by Mert Nuhoglu
on Stack Overflow
See other posts from Stack Overflow
or by Mert Nuhoglu
Published on 2009-08-11T16:58:23Z
Indexed on
2010/04/14
0:23 UTC
Read the original article
Hit count: 543
I try to customize behavior of sys.excepthook as described by the recipe.
in ipython:
:import pdb, sys, traceback
:def info(type, value, tb):
: traceback.print_exception(type, value, tb)
: pdb.pm()
:sys.excepthook = info
:--
>>> x[10] = 5
-------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
NameError: name 'x' is not defined
>>>
pdb.pm() is not being called. It seems that sys.excepthook = info doesn't work in my python 2.5 installation.
What should I look into? Any suggestion?
Thank you
© Stack Overflow or respective owner