[Twisted-Python] wxPython

Uwe C. Schroeder uwe at oss4u.com
Tue Feb 8 14:25:27 MST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Try the original recipe from the python cookbook. It works for me across 
platforms. I'm using 80ms for the timer. As Itamar put it, it's not perfectly 
reliable and usually needs tweaking with the timer. I found values between 80 
and 120 ms to be working.
Writing a real reactor is at least very complicated if not impossible. Wx uses 
the internal even loops of the platforms underlying graphical toolkit, so 
this means the whole thing works differently when using GTK or GTK2 or 
Windows Controls or Mac... etc. So the reactor code would have to be smart 
enough to detect the platform and hook into the graphical system's eventloop.
Windows uses multiple event loops for modal dialogs, so whenever you open a 
modal window on windows a secondary eventloop handles that one window and the 
primary eventloop is stuck until the modal window closes. Same goes for 
pulldown menues.

Uwe
  

On Tuesday 08 February 2005 11:34 am, Itamar Shtull-Trauring wrote:
> On Tue, 2005-02-08 at 19:47 +0100, Neal Nelson wrote:
> > I can't seem to get wxPython to work with Twisted 1.3. I started
> > developing a system some time ago but I've only just got back to it and
> > the user interface no longer works, which is a bit of a problem.
> >
> > Should wx work or is this broken in Twisted?
>
> There are ways to use Twisted with wx (e.g. using two threads) but
> unfortunately I could get neither wxreactor nor wxsupport nor to work
> reliably across Linux and Win32. So, yes, but you need to do extra work
> - the python cookbook has a few suggestions.
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

- -- 
	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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFCCS5HjqGXBvRToM4RAuDvAJ9N0ooV+O+pfQ6fT2wB0GvrNTaAtwCfW2NV
SPvTXszWPcJnjiajIKfu2UA=
=D/wc
-----END PGP SIGNATURE-----





More information about the Twisted-Python mailing list