class documentation
class UtilityProcessProtocol(protocol.ProcessProtocol): (source)
Known subclasses: twisted.test.test_process.GetArgumentVector
, twisted.test.test_process.GetEnvironmentDictionary
Helper class for launching a Python process and getting a result from it.
Class Method | run |
Run a Python process connected to a new instance of this protocol class. Return the protocol instance. |
Method | __init__ |
Undocumented |
Method | get |
Return a Deferred which will fire with the result of parseChunks when the child process exits. |
Method | out |
Accumulate output from the child process in a list. |
Method | parse |
Called with all bytes received on stdout when the process exits. |
Method | process |
Handle process termination by parsing all received output and firing any waiting Deferreds. |
Instance Variable | bytes |
Undocumented |
Instance Variable | program |
The name of the program to run. |
Instance Variable | requests |
Undocumented |
Method | _fire |
Callback all Deferreds returned up until now by getResult with the given result object. |
Inherited from ProcessProtocol
:
Method | child |
Called when a file descriptor associated with the child process is closed. |
Method | child |
Called when data arrives from the child process. |
Method | err |
This will be called when stderr is closed. |
Method | err |
Some data was received from stderr. |
Method | in |
This will be called when stdin is closed. |
Method | out |
This will be called when stdout is closed. |
Method | process |
This will be called when the subprocess exits. |
Class Variable | transport |
Undocumented |
Inherited from BaseProtocol
(via ProcessProtocol
):
Method | connection |
Called when a connection is made. |
Method | make |
Make a connection to a transport and a server. |
Instance Variable | connected |
Undocumented |
Run a Python process connected to a new instance of this protocol class. Return the protocol instance.
The Python process is given self.program on the command line to execute, in addition to anything specified by argv. env is the complete environment.
overridden in
twisted.test.test_process.GetArgumentVector
, twisted.test.test_process.GetEnvironmentDictionary
Called with all bytes received on stdout when the process exits.
overridden in
twisted.test.test_process.GetArgumentVector
, twisted.test.test_process.GetEnvironmentDictionary
The name of the program to run.