Tkinter locks Python when an icon is loaded and tk.mainloop is in a thread
Here's the test case... import Tkinter as tk import thread from time import sleep if __name__ == '__main__': t = tk.Tk() thread.start_new_thread(t.mainloop, ()) # t.iconbitmap('icon.ico') b = tk.Button(text='test', command=exit) b.grid(row=0) while 1: sleep(1) This code works. Uncomment the t.iconbitmap line and it locks. Re-arrange it any way you like; it will lock. How do I prevent tk.mainloop locking the GIL when there is an icon present? The target is win32 and Python 2.6.2. codeape I believe you should not execute the main loop on a different thread. AFAIK, the main loop should be