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

Gerardo Juarez gerardo at computo-industrial.com.mx
Tue Nov 14 01:32:36 CET 2006


Hi,

Yes it does that. No, I don't know what causes it but it seems to be an 
interaction with the OS. I assume you are using IDLE.
 
Have you tried Shell/Restart Shell (Ctrl+F6)? It has worked for me most of 
the times. It is interesting that an application using several threads 
seems easier to stop cleanly.


On Mon, 13 Nov 2006, Greg Hoyle wrote:

> 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
> 



More information about the Tkinter-discuss mailing list