New submission from Claudiu Popa: It seems that sys.excepthook doesn't receive the traceback when an error occurs during a code.InteractiveInterpreter run. The problem is here: https://hg.python.org/cpython/file/5ade1061fa3d/Lib/code.py#l168. last_tb was previously set to None right before. The attached patch passes sys.last_traceback to sys.excepthook.
---------- components: Library (Lib) files: code_excepthook_traceback.patch keywords: patch messages: 227881 nosy: Claudiu.Popa, r.david.murray priority: normal severity: normal status: open title: sys.excepthook doesn't receive the traceback when called from code.InteractiveInterpreter type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file36759/code_excepthook_traceback.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22522> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com