[Tkinter-discuss] Tkinter under SMP
Douglas S. Blank
dblank at cs.brynmawr.edu
Tue May 25 03:39:27 EDT 2004
Thanks, Jeff, for your poking around. I have installed python2.3, and
found that the problem persists.
Here is what I think is causing the problem:
I usually create a Tk() object like:
self.app = Tkinter.Tk()
self.app.withdraw()
self.win = Tkinter.Toplevel()
And in another thread, I might do the same. This seems to be the
problem. If these two toplevels get updated slowly, then I'm fine. If I
have them all in one thread, it seems fine too. But if I have two, and
they are getting updated fairly quickly (multiple times/second) then it
either causes a weird bug, or just seg faults. I suspect that there is
something global that both apps (or wins) are sharing.
Is there a better way of creating multiple Toplevels?
Any suggestions would be appreciated!
-Doug
Jeff Epler wrote:
> I did a little research on this and found
> http://mail.python.org/pipermail/python-dev/2002-December/031107.html
>
> I hope somebody else can expand on this, but (at least historically) Tk
> and Python threads didn't mix. Maybe this is still true to some degree,
> and maybe depending on the Python version. RedHat 9 had Python 2.2.2.
> The change discussed in that message was applied to the 2.3 branch, but
> doesn't exist in 2.2.
>
> Jeff
>
>
More information about the Tkinter-discuss
mailing list