[PEAK] peak.events + twisted + wxPython?
golux at comcast.net
Sat Apr 24 11:06:27 EDT 2004
lists at net-labs.de [Ulrich] wrote:
>>Has anyone experimented with that combination?
>>In particular, I'm wondering whether the use of peak.events might
>>circumvent the well-known antagonism between the twisted and
>>wx event loops.
> nllgui uses the twisted-eventloop with wxPython.
Thanks, Ulrich! That's very interesting -- I'll look at
> i tried 2 ways:
> - calling <wxApp>.Dispatch() from the reactor
> like wx_support of twisted
> - starting a wxTimer to call runUntilCurrent/doIteration
> on the twisted reactor
> the first one worked better, but i didn't solve all problems
> regarding responsiveness of gui while using sync calls e.g.
So apparently there is no silver bullet yet.
I wouldn't be surprised if it took a lot of work,
maybe some hacking in wx's C++ code, to get them to work
together properly. I wonder if we could get Robin Dunn
or Julian Smart interested in writing a special
"wxreactor" that Uwe suggests might be the best approach.
It would be *way* beyond my level.
In the first case you were doing synchronous db access,
rather than using twisted's adbapi, correct?
But also in the first case, you were not using the wxTimer
method. And the menus functioned okay? The motivation
for Uwe Schroeder to come up with that recipe for using
twisted and wx together was that the menus and modal
dialogs get stuck.
> the sources are at:
> look at:
> class wxApp/_runAsync|_onTimer
> cheers Ulrich
More information about the PEAK