[Tkinter-discuss] why tkinter do not quit?

Igor Novikov igor.e.novikov at gmail.com
Tue Aug 9 15:50:00 CEST 2011


Hi,

root.quit is a reference to object field but not a quit() method.
Try using root.quit() This should resolve an issue.

-- 
Regards,

Igor Novikov
sK1 Project
http://sk1project.org

2011/8/9 守株待兔 <1248283536 at qq.com>

> here is my program:
> from Tkinter import *
> def helloButton():
>     print 'hello button'
>     root.quit
> root = Tk()
> Button(root,text = 'Hello Button',command = helloButton).pack()
> root.mainloop()
>
> when i click on my  button,print is ok,why  root.quit have no effect?
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110809/db5c0fc0/attachment.html>


More information about the Tkinter-discuss mailing list