[issue12643] code.InteractiveConsole ignores sys.excepthook

aliles report at bugs.python.org
Wed Jul 27 14:43:29 CEST 2011


aliles <aaron.iles at gmail.com> added the comment:

OK. Not something I was expecting to be asked. But cool :D

If it's not possible for InteractiveConsole to allow exceptions to propagate through sys.excepthook. (I assume they are being caught in a try: catch: block) check sys.excepthook for a custom exception handler and call present.

As InteractiveConsole is supposed to "Closely emulate the behaviour of the interactive Python interpreter", any existing code that replies on it's current could be viewed as relying on a bug.

I'd be happy to attempt a patch if it's worthwhile preparing one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12643>
_______________________________________


More information about the Python-bugs-list mailing list