[Twisted-Python] Folding the server into the client?

Itamar Turner-Trauring itamar at itamarst.org
Wed Sep 14 16:29:29 EDT 2011

> Or am I missing something important that would make things simpler (or
> maybe impossible)?

You could create a Python API that looks close enough to the code using
xmlrpclib, but just uses direct Python function calls. Depending on your
code this may mean you don't actually need the reactor. If you do need a
reactor, you could still do it without actually doing xmlrpc queries to
yourself. If you run the reactor in a different thread,
blockingCallFromThread lets you "wait" on a Deferred from another
non-reactor thread, in your case the GUI thread (might block your GUI

There's also wxreactor which... probably works.

More information about the Twisted-Python mailing list