[Tkinter-discuss] Python shell still running after program has been terminated

Greg Hoyle ghoyle at gmail.com
Mon Nov 13 10:01:42 CET 2006


Howdy,

While making a small program using python 2.4.4, I have run into a problem
getting the python shell to stop running the program. I am not certain of
what the problem could be and i'm wondering if there's a way that I can
avoid encountering this problem in the future. The details are below.

I can run the program (I normally use F5) without any problems, once;
however, when I try to run it again (with or without new changes made to the
code), I get an error window that states "Already Executing: The Python
Shell window is already executing a command; please wait until it is
finished." This window appears twice (back to back) then this is printed out
in the shell window:

________________________________________________________________
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "C:\Python24\lib\idlelib\ScriptBinding.py", line 166, in
run_module_event
    interp.runcode(code)
  File "C:\Python24\lib\idlelib\PyShell.py", line 697, in runcode
    self.interp.restart_subprocess()
AttributeError: ModifiedInterpreter instance has no attribute 'interp'
_________________________________________________________________



Just in case you need it, here's the code that im using that causes this:

###############################################
from Tkinter import *
root = Tk()

listbox = Listbox(root)
listbox.pack()

name_list = ('name1', 'name2', 'name3', 'name4')

for item in name_list:
    listbox.insert(END, item)

print name_list

root.mainloop()
#################################################


Am I missing something? I am using windows xp media center and the file is
save as .pyw. I cant think of any other information that you might need. If
you do need more, please let me know and i'll provide it.

Thanks for any assitance that you can provide.

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20061113/fbcf73f5/attachment.html 


More information about the Tkinter-discuss mailing list