P
Philippe C. Martin
Hi,
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
buffer.
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.
ex:
% import dontexist
Traceback (most recent call last):
File "<pyshell#3>", line 1, in -toplevel-
import dontexist
ImportError: No module named dontexist
If I don"t trap it, then my clean up code which is after the exec obviously
does not get called (i.e, clear my input buffer, save the history, print a
prompt .......)
Yet Idle manages - any clue ?
Regards,
Philippe
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
buffer.
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.
ex:
% import dontexist
Traceback (most recent call last):
File "<pyshell#3>", line 1, in -toplevel-
import dontexist
ImportError: No module named dontexist
If I don"t trap it, then my clean up code which is after the exec obviously
does not get called (i.e, clear my input buffer, save the history, print a
prompt .......)
Yet Idle manages - any clue ?
Regards,
Philippe