[Twisted-Python] Re: GUI responsiveness

Stefano Masini stefano at pragma2000.com
Wed Sep 14 14:30:55 EDT 2005

On 9/14/05, Ed Suominen <general at eepatents.com> wrote:
> MySQL-based persistency  and a graphically demanding GUI.  I took a look
> at wxPython but was somewhat turned off by the complication of
> integrating it with Twisted, which I'm using to do top-level dispatching

I've already commented about this on the thread this one spinned off
from, but I'll repeat it here: wxPython *can* be used with Twisted,
and it's not very complicated.
I use two separate threads (with two event loops) and two proxy
objects to vehicle the requests from one thread to the other.

I just learnt there is a wonderful threadedselectreactor that allows
for an easy integration of twisted and wx inside the same event loop,
but I haven't tried it yet.
Actually, and I'm sure I will say some nonsense here, so please
correct me if you are in the know, I'm wondering if having the same
loop process both wx and twisted events could harm twisted
responsiveness, or viceversa.

By the way, I have to say that using proxy objects is not that bad. I
actually think it's quite nice to have all the possible interaction
formalized as methods all belonging to the same object. But in my case
I don't have a *very* complicated interaction: from the network side,
I just need to raise dialogs, update the status bar, update table
contents, open and close windows and stuff like this. From the gui
side I need to start a connection protocol, stop it, trigger
communication with a server, send updates, and stuff like this. So,
it's not a million of methods, it's just a few, that I actually like
having all sorted in the same place.


More information about the Twisted-Python mailing list