[Twisted-Python] wxPython and Twisted event loops
Uwe C. Schroeder
uwe at oss4u.com
Sat Feb 22 00:18:17 MST 2003
On Friday 21 February 2003 07:28 pm, Andrew Bennetts wrote:
> On Fri, Feb 21, 2003 at 02:48:04AM -0800, Uwe C. Schroeder wrote:
> > Hi,
> >
> > for those interested, I just posted a recipe on the activestate.com
> > python cookbook about how to get wxPython running with Twisted withoud
> > having blocked menu's and modal dialogs.
> >
> > It's a simple and dirty hack, but it's working on linux and win
> > (basically all systems using the default select reactor)
>
> Is there any reason why you aren't using the twisted.internet.wxsupport
> module?
Yes, it doesn't work. :-)
wxPython (as does wxWindows) uses private eventloops for menus and modal
dialogs. This means whenever you open a modal dialog or a menu, the main
eventloop will freeze and wait for the child eventloop (the one of the menu
or modal dialog) to finish.
Since wxsupport only emulates the main eventloop it will be stuck until you
close the dialog.
UC
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
More information about the Twisted-Python
mailing list