[Twisted-Python] Status of wxPython support in Twisted 2.1: use wxreactor
wxreactor in Twisted 2.1 uses threadedselectreactor. This means that wx apps ought to use wxreactor, not TSR directly; there are some issues with vanilla TSR wx integration that are also present in wxreactor, but will be fixed in future versions of wxreactor. What's broken (there may be more): 1. reactor shutdown events aren't handled correctly (e.g. Deferred returned from during-shutdown event). 2. Signal handling for e.g. Ctrl-C is caught by wx, not twisted. In order to get these fixed I need your help. I have a version of wxreactor that *probably* fixes these in Subversion trunk. You can try it out by running doc/core/examples/wxdemo.py. Hitting Ctrl-C, choosing Exit from the menu or closing the menu all should have the same effect - the application logs "shutting down in 0.3 seconds...", "2", "1", "0" then exits. In addition, "Hello world" should continue to be printed while the dialog box is open or you are holding down a menu. Please try this out, and report success or failure at <http://twistedmatrix.com/bugs/issue1235>. I'm especially interested to hear if it works on Windows or Mac OS X. Please include your OS and version of wxPython/wxWidgets when submitting reports.
On Mon, 2005-10-10 at 11:06 -0400, Itamar Shtull-Trauring wrote:
wxreactor in Twisted 2.1 uses threadedselectreactor. This means that wx apps ought to use wxreactor, not TSR directly; there are some issues with vanilla TSR wx integration that are also present in wxreactor, but will be fixed in future versions of wxreactor.
What's broken (there may be more): 1. reactor shutdown events aren't handled correctly (e.g. Deferred returned from during-shutdown event). 2. Signal handling for e.g. Ctrl-C is caught by wx, not twisted.
In order to get these fixed I need your help. I have a version of wxreactor that *probably* fixes these in Subversion trunk. You can try it out by running doc/core/examples/wxdemo.py. Hitting Ctrl-C, choosing Exit from the menu or closing the menu all should have the same effect - the application logs "shutting down in 0.3 seconds...", "2", "1", "0" then exits. In addition, "Hello world" should continue to be printed while the dialog box is open or you are holding down a menu.
Please try this out, and report success or failure at <http://twistedmatrix.com/bugs/issue1235>. I'm especially interested to hear if it works on Windows or Mac OS X. Please include your OS and version of wxPython/wxWidgets when submitting reports.
Hi Itamar, So, rushing in where, ahh, somebody else fears to tread, I've decided to use wx and Twisted on a project. Any updates on this I should know about? Anything I can help you with? I'm noticing my own cheesie hello world (PythonCard's 'counter' example all cozy snuggly with wxreactor) doesn't quit on a ctrl-c with Twisted 2.2.0 on Debian unstable -- not really sure what that means, just thought I'd mention it. Steve
The status is that I never got around to merging those improvements. A severe bout of RSI has cut my computer hours even further recently, so I'm only likely to be able to do so if I do some pair programming.
I'm sorry to hear that, RSI sure is nasty. I had a bad experience with it myself recently; it only went away after I broke down and bought a new chair and one of those funky Kinesis keyboards. (Then I spilled water in the keyboard, but that's another story. We should all thank our lucky stars every day for water's low boiling point, don't you think?) So it's question of merging rather than further bug fixing? I looked at the feedback on the corresponding bug report <http://twistedmatrix.com/bugs/issue1235> and it seemed like there was still an issue on the Mac -- did you find a solution for that? Steve On Fri, 2006-06-30 at 12:11 -0400, Itamar Shtull-Trauring wrote:
The status is that I never got around to merging those improvements. A severe bout of RSI has cut my computer hours even further recently, so I'm only likely to be able to do so if I do some pair programming.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On Fri, 2006-06-30 at 10:38 -0700, Steve Freitas wrote:
So it's question of merging rather than further bug fixing?
Probably. Maybe I'll get JP to help me with it on the weekend.
I looked at the feedback on the corresponding bug report <http://twistedmatrix.com/bugs/issue1235> and it seemed like there was still an issue on the Mac -- did you find a solution for that?
I think the current version doesn't work on Mac either, so it's certainly not worse :)
On Fri, 30 Jun 2006 14:18:41 -0400, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
On Fri, 2006-06-30 at 10:38 -0700, Steve Freitas wrote:
So it's question of merging rather than further bug fixing?
Probably. Maybe I'll get JP to help me with it on the weekend.
I looked at the feedback on the corresponding bug report <http://twistedmatrix.com/bugs/issue1235> and it seemed like there was still an issue on the Mac -- did you find a solution for that?
I think the current version doesn't work on Mac either, so it's certainly not worse :)
This is what wxreactor does for me: exarkun@charm:/tmp$ trial --reactor wx twisted Using twisted.internet.wxreactor reactor Running 2741 tests. twisted.conch.test.test_cftp TestOurServerBatchFile testBatchFile ... Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 13262, in <lambda> lambda event: event.callable(*event.args, **event.kw) ) StopIteration Both in trunk and in the branch. I think it needs some more work. I'm not really interested in doing it on my own time. If someone wants to sponsor the development I might consider it. Jean-Paul
On Fri, 2006-06-30 at 14:43 -0400, Jean-Paul Calderone wrote:
This is what wxreactor does for me:
exarkun@charm:/tmp$ trial --reactor wx twisted Using twisted.internet.wxreactor reactor Running 2741 tests. twisted.conch.test.test_cftp TestOurServerBatchFile testBatchFile ... Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 13262, in <lambda> lambda event: event.callable(*event.args, **event.kw) ) StopIteration
Both in trunk and in the branch. I think it needs some more work. I'm not really interested in doing it on my own time. If someone wants to sponsor the development I might consider it.
Lemme see what I've got in my wallet... *rooting around* I've got a $20! It's too bad this continues to have snags -- PythonCard plus Twisted sure makes a killer combo for easily building cross-platform networked client apps, much more worthy of the level of praise Rails is getting than, say, Rails. Steve
On Fri, 2006-06-30 at 14:18 -0400, Itamar Shtull-Trauring wrote:
On Fri, 2006-06-30 at 10:38 -0700, Steve Freitas wrote:
So it's question of merging rather than further bug fixing?
Probably. Maybe I'll get JP to help me with it on the weekend.
I looked at the feedback on the corresponding bug report <http://twistedmatrix.com/bugs/issue1235> and it seemed like there was still an issue on the Mac -- did you find a solution for that?
I think the current version doesn't work on Mac either, so it's certainly not worse :)
Well I'm willing to put some effort towards getting this reactor working, if anybody in the know is willing to put up with a series of (hopefully) decreasingly stupid questions. Twisted really needs a reactor that Just Works with a good cross-platform GUI toolkit. (Yeah Tk and GTK blah blah, but who buys a Mac so they can't lick their apps?) JP and Itamar, have you got any feel for the difficulty level of making wxreactor pass the tests? Steve
participants (3)
-
Itamar Shtull-Trauring
-
Jean-Paul Calderone
-
Steve Freitas