[Twisted-Python] pyprocessing in twisted

L. Daniel Burr ldanielburr at mac.com
Fri Jun 6 12:51:19 EDT 2008

Hi Peter,

On Fri, 06 Jun 2008 11:37:41 -0500, Peter Sabaini <peter at sabaini.at> wrote:


> I'd like to isolate code running in "process B" -- for now this is just a
> prototype, but later on it could well be code I have not much control  
> over,
> so I don't want it to interact bad with Twisted. And I want to be able to
> signal it etc. separately from the Twisted process. PyProcessing seemed  
> like
> an easy way to do this.
> peter.

I'd definitely advise sticking with reactor.spawnProcess; using that,
along with a ProcessProtocol implementation, is going to allow you
to integrate more smoothly with the rest of your Twisted app.

The catch here is that, depending upon your needs, you may have tp
write your own ProcessProtocol, specific to your app; if you want
something that provides more "out-of-box" functionality, I might
suggest you look at ampoule, https://launchpad.net/ampoule/, which
gives you a process pool, and handles most of the low-level stuff.

Hope this helps,

L. Daniel Burr

More information about the Twisted-Python mailing list