[Twisted-Python] Wrapping blocking code

Bob Ippolito bob at redivi.com
Fri Jul 25 12:53:31 EDT 2003

On Friday, Jul 25, 2003, at 11:42 America/New_York, Justin Johnson 

> reason is an Exception from twisted.internet.error.  It is an instance 
> of
> ProcessDone if it completes successfully.  How can this be called?  
> When
> I was using the other process.py module, it allowed me to get stdout,
> stderr, and the status.  That is really all I want to do.  So it seems
> like stdout and stderr are easy to get with the xxxReceived methods, 
> and
> then the status would have to be determined from the type of exception
> processEnded gets as the "reason" argument, right?

This is untested, since I don't have a windows box around.. didn't 
check for syntax errors.. but I believe this will do what you want it 
to do:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: my.py
Type: application/octet-stream
Size: 1723 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030725/72c52506/attachment.obj 

More information about the Twisted-Python mailing list