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.

Instance Variable programName The name of the program to run.
Class Method run Run a Python process connected to a new instance of this protocol class. Return the protocol instance.
Method __init__ Undocumented
Method parseChunks Called with all bytes received on stdout when the process exits.
Method getResult Return a Deferred which will fire with the result of parseChunks when the child process exits.
Method outReceived Accumulate output from the child process in a list.
Method processEnded Handle process termination by parsing all received output and firing any waiting Deferreds.
Method _fireResultDeferreds Callback all Deferreds returned up until now by getResult with the given result object.

Inherited from ProcessProtocol:

Method childDataReceived Called when data arrives from the child process.
Method errReceived Some data was received from stderr.
Method childConnectionLost Called when a file descriptor associated with the child process is closed.
Method inConnectionLost This will be called when stdin is closed.
Method outConnectionLost This will be called when stdout is closed.
Method errConnectionLost This will be called when stderr is closed.
Method processExited This will be called when the subprocess exits.

Inherited from BaseProtocol (via ProcessProtocol):

Method makeConnection Make a connection to a transport and a server.
Method connectionMade Called when a connection is made.
programName =
The name of the program to run.
@classmethod
def run(cls, reactor, argv, env):

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.

def __init__(self):
Undocumented
def parseChunks(self, bytes):

Called with all bytes received on stdout when the process exits.

def getResult(self):

Return a Deferred which will fire with the result of parseChunks when the child process exits.

def _fireResultDeferreds(self, result):

Callback all Deferreds returned up until now by getResult with the given result object.

def outReceived(self, bytes):

Accumulate output from the child process in a list.

def processEnded(self, reason):

Handle process termination by parsing all received output and firing any waiting Deferreds.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.