[pypy-issue] [issue811] sys.excepthook not used by interactive interpreter

Antonio Cuni tracker at bugs.pypy.org
Wed Jul 27 13:33:36 CEST 2011

Antonio Cuni <anto.cuni at gmail.com> added the comment:

This is not a bug, CPython has the very same behavior:

$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import excepthook
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "excepthook.py", line 29, in <module>
    raise SyntaxError('FAIL')
SyntaxError: FAIL

This happens because the interactive interpreter catches and prints the
exception by itself, so it never goes through the excepthook.

status: unread -> invalid

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list