Python GUIs: Abandoning TkInter and welcoming wxPython?

Cameron Laird claird at Starbase.NeoSoft.COM
Tue Jun 29 17:45:16 CEST 1999


In article <ui6747qhvz.fsf at bacon.ethz.ch>,
Ernst-Udo Wallenborn  <wallenborn at phys.chem.ethz.ch> wrote:
>
>
>To ask a completely different question: What about
>threads and GUI? With Tkinter you have to rewirte the
>mainloop like this
>
>    def mainloop(self):
>        while 1:
>            Frame.update(self)
>            time.sleep(0.02)
>            if self.quitting == 1:
>                sys.exit(0)
>
>
>to convince it to run with thread or threading.  I remember having
>read a comment from Guido van Rossum, citing Jan Osterhout that Tk
>will never be thread-safe and that therefore this problem will not go
>away.
>
>Would this be any different with a different GUI kit?
			.
			.
			.
As Mr. Zeitlin asserts in his follow-up, multi-threading
the GUI is generally a futile hazard.

Dr. Ousterhout always, as far as I know, goes by his
Americanized given name John.  I make the point because
one of the people working most actively with Tk capabil-
ities is Jan Nijtmans.

Yes, John has said he expects Tk never to be thread-safe.
That has changed, though, just in the last few months.
You're quite right that many toolkits have issues in re-
gard to threading.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird at NeoSoft.com      +1 281 996 8546 FAX




More information about the Python-list mailing list