[PyKDE] twisted and PyQt4

Toby Dickenson tdickenson at devmail.geminidataloggers.co.uk
Thu Jun 1 12:27:03 BST 2006


On Thursday 01 June 2006 11:24, scalet at yebu.de wrote:
> just for the record,
> 
> I got some replies on the twisted mailing list, now
> they have an experimatal reactor for pyqt4 in there
> tracking system:
> 
> http://twistedmatrix.com/trac/ticket/1770
> 
> I used it and it worked fine, so far

Im not sure which platform you are using, but Ive never had much success with 
this approach on Windows. Your main thread normally spends its time running 
the Qt main loop, however on Windows it is quite legitimate for library 
functions to briefly run their own message loop. Examples include standard 
dialog boxes (file chooser, font chooser etc), MessageBox, and cross-process 
COM method calls. This will cause your twisted reactor to stop processing 
twisted events until control returns to the Qt message loop.

One alternative approach which does integrate well with these secondary 
message loops is Twisted's ThreadedSelectReactor. (I forget whether this is 
released now, or whether you need to grab it from SVN). 

-- 
Toby Dickenson




More information about the PyQt mailing list