Python 3.4.3 Tkinter - Program Freezes On Declaration Of Intvar Or Any Other Tkinter Data Type
Previous thread: Python 3.4 tkinter checkbutton variable handling not working / responding Following a long thread the problem appears to be related to the declaration of an IntVar
Solution 1:
(note: my original answer was related to the use of grid
and pack
. That answer was incorrect. This is the correct answer)
You have stumbled on a very obscure edge case that doesn't exist in python 2.6, but does exist in at least some versions of python 3.
I'm testing it on 3.4. In that version there's been some new code introduced in the variable handling code. Your code causes this new code to go into an infinite loop. The problem revolves around your choice to use master
as the name of a widget attribute. This is a built-in attribute that you are overwriting, causing the code to go into an infinite loop.
The workaround is simple: rename window.master
to be just about anything other than master
. For example:
window._master = tk.Frame(window)
Post a Comment for "Python 3.4.3 Tkinter - Program Freezes On Declaration Of Intvar Or Any Other Tkinter Data Type"