Terry J. Reedy <tjre...@udel.edu> added the comment:
The method to run just code in userspace, without involving the debugger or history list, is runcommand. It needs a code string. The hard part is the code needed to recreate the exception instance in the user space. It will be different for SyntaxError versus the other error possible when compiling. The SE details tuple has a mix of strs and ints. I believe I know in principle how to do it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45560> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com