Hello everyone, The latest Python version (3.10.a5) of IDLE's repl has support for user-defined exception hooks. After being contacted by Terry Reedy about this feature, I investigated integrating Friendly-traceback [1] with IDLE.
For those that are interested, I have documented on github [2] (with screenshots) how Friendly-traceback works with IDLE, including some limitations. Feel free to comment on that issue for any suggestion you might have about possible improvements to Friendly-traceback, including the current API used. In some cases, I determine based on Python's version whether or not a feature can be enabled. I consider this to be brittle. Rather than relying on Python's version, I would much prefer if I could be able to write something like: try: from idlelib import support_excepthook except: support_excepthook = False This would be especially useful if this support for user-defined exception hooks within IDLE's shell is backported to older versions of Python. Something similar would also be useful if and when support for custom handling of SyntaxError is added to IDLE. Best, André Roberge [1] https://aroberge.github.io/friendly-traceback-docs/docs/html/ Currently, the documentation does not include the new IDLE-related features. [2] https://github.com/aroberge/friendly-traceback/issues/183
_______________________________________________ IDLE-dev mailing list IDLE-dev@python.org https://mail.python.org/mailman/listinfo/idle-dev