[Twisted-Python] wxPython and Twisted event loops
![](https://secure.gravatar.com/avatar/b174cc623da9f3f971301ff2ca31c58a.jpg?s=120&d=mm&r=g)
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) enjoy 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
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
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? -Andrew.
![](https://secure.gravatar.com/avatar/b174cc623da9f3f971301ff2ca31c58a.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/792121149081c9c0fd251c5bbc7691cb.jpg?s=120&d=mm&r=g)
Is there any reason why you aren't using the twisted.internet.wxsupport module?
-Andrew.
Yes, I have tested it also, and needed the activeState solution. Some dialogs froze when accessing to databases for exemple (or connecting to a server via PB). the "dirty" solution solve the problem
participants (3)
-
Andrew Bennetts
-
Philippe Lafoucrière
-
Uwe C. Schroeder