[Twisted-Python] Re: Need advice on changing blocking calls to be Twisted-aware...

Stuart Hungerford stuart.hungerford at anu.edu.au
Tue May 20 21:18:36 EDT 2003

I wrote:

| Can someone point me to some example code where a
| blocking-system-call-and-it's-results-needed-here pattern
| is expressed in the spawnProcess/Deferred/callback world
| of Twisted?

Very helpful replies:

| Use twisted.internet.utils.getProcessOutput, which returns a Deferred.
| Your code should something like:

   Many thanks Andrew and Moshe for the advice here, much 
   appreciated.  Flushed with success I started to think about
   .render()'ing web pages with not just one blocking system call
   but a number of them.

   Can I register multiple callbacks in the deferred model with
   one per system call?  Or alternatively, can callbacks re-register
   themselves and handle the system calls in a 'chain'?



More information about the Twisted-Python mailing list