[Twisted-Python] RPython and Twisted

Jean-Paul Calderone exarkun at divmod.com
Mon Nov 3 17:25:33 EST 2008

On Mon, 3 Nov 2008 13:21:20 -0800 (PST), Andrew Francis <andrewfr_ice at yahoo.com> wrote:
>Hi Folks:
>This is new to me so here goes.....
>I am taking my first baby steps with PyPy. I wish to start experimenting by re-writing an example (the programme I posted in RPtyhon and converting it to C. However I want to still use Twisted for networking.
>One approach I was thinking about was to somehow compile the program as a C extension library and somehow have it talk to Twisted - I would like to keep my code and Twisted in the same process. Am I on the right track?
>Any hints would be appreciated. If there is interest I can summarise my findings.

Since the RPython/PyPy toolchain currently has better support for generating
standalone executables than for doing much else, I'd suggest taking that
approach.  Compile your RPython to a standalone executable, run it from a
Twisted-based process and do some simple RPC over stdio.  It's a bit heavy
handed, but I think it's the most straightforward approach given the state
of RPython.  The PyPy developers can probably give you better ideas about
what long-term direction might be best, though.  There's probably nothing
special about using RPython with Twisted - from the RPython perspective,
Twisted is just another pile of Python code that you need to figure out an
integration strategy for.  Whatever the generally correct approach is is
probably the approach that makes sense for using Twisted.


More information about the Twisted-Python mailing list