exit from Tkinter mainloop Python 2.7

Dave Farrance df at see.replyto.invalid
Wed Feb 24 04:34:43 EST 2016


kevind0718 at gmail.com wrote:

>from Tkinter import *
>
>def butContinue():
>    root1.destroy()

As Christian said, you're destroying the root window and its children,
so instead use root1.quit() here.

> ...
>
>root1.mainloop()
>
>print entryName.get("1.0", "end-1c" )
>print entryPWord.get("1.0", "end-1c" )

And your root1.destroy() goes here instead. (The root window would
normally be destroyed on the script exit, but some IDE debuggers will
leave it open.) 



More information about the Python-list mailing list