Threaded Tkinter

Robin Becker robin at jessikat.demon.co.uk
Thu Jun 3 07:04:17 EDT 1999


In article <m3btex4vxu.fsf at tiana.kli.prv>, Gerald Gutierrez
<gutier at intergate.bc.ca> writes
>
>Hi all.
>
>I have two questions and I'd really appreciate it if someone could
>help me sort it out.
>
>My first one -- I'm starting out with Tkinter. I wrote the code below,
>which will supposedly create a button with an image, that image
>changing every second. If I set the button to call swapIcons() when
>pressed, the image changes fine, but using the SpinThread, the icons
>don't change. Is this because Tkinter is not thread-safe and I cannot
>safely change the button's image property from within a thread other
>than the main one?
>
... code & Q2 elided
...
I tried this with 1.5.2 + win95 + local gifs and it worked fine for me.
Should I leave it running for a while?
-- 
Robin Becker




More information about the Python-list mailing list