quitting tkinter in Python 3 using Wing 101 on Mac

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

quitting tkinter in Python 3 using Wing 101 on Mac

WingIDE - User mailing list
When I run

#! /usr/local/bin/python3

from tkinter import *
from tkinter.ttk import *
root = Tk()
Button(root, text="Quit", command=root.quit).pack()
root.mainloop()

on OS X 10.11.5 from the terminal it works fine, exiting normally when I
click on the button. However, when I run it using Wing 101 and click on
the button the Python shell in the IDE goes back to the prompt ">>>" but
the spinning rainbow wheel of death starts up; I have to kill the Python
app using Force Quit. What should I do differently?

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: quitting tkinter in Python 3 using Wing 101 on Mac

WingIDE - User mailing list
Richard Barth via wingide-users wrote:

> When I run
>
> #! /usr/local/bin/python3
>
> from tkinter import *
> from tkinter.ttk import *
> root = Tk()
> Button(root, text="Quit", command=root.quit).pack()
> root.mainloop()
>
> on OS X 10.11.5 from the terminal it works fine, exiting normally when
> I click on the button. However, when I run it using Wing 101 and click
> on the button the Python shell in the IDE goes back to the prompt
> ">>>" but the spinning rainbow wheel of death starts up; I have to
> kill the Python app using Force Quit. What should I do differently?

I'm not sure why this is happening but you can also Restart Shell from
the Python Shell's Options menu to kill the remaining window.

Also, it seems if I debug instead from the Debug menu then it exits as
expected.  It may be root.quit is not what you want anyway in the Python
Shell because typically you don't want to quit the shell process when
evaluation finishes.

Please let me know if this does not help.

Thanks,


_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: quitting tkinter in Python 3 using Wing 101 on Mac

WingIDE - User mailing list
the Restart Shell work around is easier than using Force Quit but it
seems odd that the standard method of exiting an application doesn't
work smoothly with Wing 101; if there is nothing I should be doing
differently then is this something that can be fixed in the future?


On 6/5/16 4:06 PM, Stephan Deibel wrote:

> Richard Barth via wingide-users wrote:
>> When I run
>>
>> #! /usr/local/bin/python3
>>
>> from tkinter import *
>> from tkinter.ttk import *
>> root = Tk()
>> Button(root, text="Quit", command=root.quit).pack()
>> root.mainloop()
>>
>> on OS X 10.11.5 from the terminal it works fine, exiting normally
>> when I click on the button. However, when I run it using Wing 101 and
>> click on the button the Python shell in the IDE goes back to the
>> prompt ">>>" but the spinning rainbow wheel of death starts up; I
>> have to kill the Python app using Force Quit. What should I do
>> differently?
>
> I'm not sure why this is happening but you can also Restart Shell from
> the Python Shell's Options menu to kill the remaining window.
>
> Also, it seems if I debug instead from the Debug menu then it exits as
> expected.  It may be root.quit is not what you want anyway in the
> Python Shell because typically you don't want to quit the shell
> process when evaluation finishes.
>
> Please let me know if this does not help.
>
> Thanks,
>
>
>

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: quitting tkinter in Python 3 using Wing 101 on Mac

WingIDE - User mailing list
On 6/6/16 3:09 PM, Richard Barth via wingide-users wrote:
> the Restart Shell work around is easier than using Force Quit but it
> seems odd that the standard method of exiting an application doesn't
> work smoothly with Wing 101; if there is nothing I should be doing
> differently then is this something that can be fixed in the future?

We'll try to take a look at this, but restarting the shell or using the
debugger is the way to go for now.

Thanks,

John

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...