[issue3835] tkinter goes into an infinite loop (pydoc.gui)

Guilherme Polo report at bugs.python.org
Tue Sep 16 19:00:30 CEST 2008


Guilherme Polo <ggpolo at gmail.com> added the comment:

If you remove the widget.config calls in GUI.ready you will notice the
problem "goes away", but note that this method is called from another
thread while you have a non-thread-safe tcl/tk lib (I'm assuming you
didn't compile it with --enable-threads). So.. using multiple threads in
Python while Tcl is compiled without --enable-threads isn't supported at
all.

To reproduce the problem try this (change Tkinter to tkinter if py3k):


import threading
import Tkinter

lbl = Tkinter.Label(text="hi")
threading.Thread(target=lambda: lbl.configure(text="hi there")).start()
lbl.mainloop()


If your tcl/tk libs weren't compiled with --enable-threads this should
get you an "TclError: out of stack space (infinite loop?)". A
documentation note may be added somewhere, but nothing much else is
going to happen (that is what I believe at least).

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3835>
_______________________________________


More information about the Python-bugs-list mailing list