tkinter shell problem
eric_brunel at despammed.com
Thu Nov 25 10:07:09 CET 2004
Philippe C. Martin wrote:
> I have the following problem:
> I wrote a tkinter shell which on a key return event first evals the input
> buffer (in a try: except:) and then, in case of except, execs the input
> I have the problem if the exec fails:
> If I trap it, I do not get the stack dump that I which I would show.
Why? When catching an exception, you can get the exception type, the exception
itself and the traceback object via the sys.exc_info() function. You can then
use the traceback module to format the traceback just as Python would print it
if the exception went to the top-most level.
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
More information about the Python-list