Multithreading tkinter question

Eric Brunel eric_brunel at
Fri Dec 17 09:48:49 CET 2004

Oleg Paraschenko wrote:
> In my case "Hello" works and "Quit" doesn't (GUI stays frozen).
> Linux, Python 2.3.3, pygtk-0.6.9.

That's not a multithreading issue, but just the way the quit method works. Try:

import time
from Tkinter import *

root = Tk()
b = Button(root, text='Quit')



When you click the "Quit" button, the GUI stays there until the time.sleep ends. 
root.quit just goes out of the mainloop; it doesn't destroy the widgets. To do 
that, you have to add an explicit root.destroy() after root.mainloop()
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools -

More information about the Python-list mailing list