python threading

Boudewijn Rempt boud at valdyas.org
Tue Apr 16 15:58:52 EDT 2002


Alex Martelli wrote:

> On Tuesday 16 April 2002 20:39, Geoffrey Talvola wrote:
> ...
>> Don't most GUI toolkits have some way to post an event to the main GUI
>> thread's event loop from another thread?  wxPython has wxPostEvent()
>> which does this.
> 
> I don't know of any Tkinter or PyQt equivalent.  I hope somebody can
> enlighten me about those, as they're the toolkits I need to use.
> 

Phil has released the first release candidate for 3.2 today, which should
fix QThread support. Qt offers support for posting events: unsuprisingly 
called QThread.postEvent(). I'm going to test this as soon as I get PyQt 
built again, so that'll probably be Wednesday evening.

Then again, QThread is a different beast from threading.Thread, so you
probably can't just use QThread.postEvent() from a Python thread :-).

-- 
Boudewijn Rempt | http://www.valdyas.org



More information about the Python-list mailing list