Issue 1228112: code.py use sys.excepthook to display exceptions (original) (raw)

Created on 2005-06-27 09:33 by tebeka, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
code.patch tebeka,2005-06-27 09:33 Patch for code.py
code1.patch tebeka,2005-06-28 06:44 Patch file
Messages (6)
msg48525 - (view) Author: Miki Tebeka (tebeka) * Date: 2005-06-27 09:33
This patch makes code.py InteractiveInterpreter use sys.excepthook to display exceptions. This way if a user changes sys.excepthook it will be used by the InteractiveInterpreter.
msg48526 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-06-27 10:57
Logged In: YES user_id=6656 Seems like a good idea to me. The only quibble around the area of self.write -- it might break code that overrides that (IDLE?). Also, shouldn't showsyntaxerror be changed too?
msg48527 - (view) Author: Miki Tebeka (tebeka) * Date: 2005-06-28 06:44
Logged In: YES user_id=358087 OK. Changed syntaxerror as well (see attached patch). Not sure I understand the comment about self.write. Overiding sys.excepthook in IDLE does *not* work. (sys.displayhook does though).
msg48528 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-06-28 08:08
Logged In: YES user_id=6656 > Not sure I understand the comment about self.write. > Overiding sys.excepthook in IDLE does *not* work. > (sys.displayhook does though). Yeah, sure, your patch changes that, but I think that with your patch idle will need to install its own sys.excepthook or exception messages will end up on the real stderr.
msg168722 - (view) Author: Aaron Iles (aliles) * Date: 2012-08-21 00:25
Has this issue been resolved by issue been resolved by #12643, which has been merged for Python 3.3?
msg168725 - (view) Author: Miki Tebeka (tebeka) * Date: 2012-08-21 01:19
Seems like #12643 did solve this. Closing.
History
Date User Action Args
2022-04-11 14:56:11 admin set github: 42132
2012-08-21 01:19:16 tebeka set status: open -> closedresolution: fixedmessages: +
2012-08-21 00:25:42 aliles set nosy: + ncoghlan, alilesmessages: +
2011-04-09 02:38:30 Trundle set nosy: + Trundle
2010-08-21 16:10:00 BreamoreBoy set stage: test needed -> patch reviewversions: + Python 3.2, - Python 2.7
2009-02-16 02:25:41 ajaksu2 set keywords: + easystage: test neededtype: enhancementversions: + Python 2.7, - Python 2.5
2005-06-27 09:33:01 tebeka create