3 ms·
One way might be to do like what IDLE does (I think) which is to essentially print the traceback to a string and extract the information. An alternative is to
by aroberge 5y ago
One way might be to do like what IDLE does (I think) which is to essentially print the traceback to a string and extract the information.
An alternative is to use https://friendly-traceback.github.io/docs/index.html https://friendly-traceback.github.io/docs/index.html which gets even more information than Python 3.10 does and is compatible with IPython/Jupyter.