class documentation

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 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 parseChunks Called with all bytes received on stdout when the process exits.
Method processEnded Handle process termination by parsing all received output and firing any waiting Deferreds.
Instance Variable bytes Undocumented
Instance Variable programName The name of the program to run.
Instance Variable requests Undocumented
Method _fireResultDeferreds Callback all Deferreds returned up until now by getResult with the given result object.

Inherited from ProcessProtocol:

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

Inherited from BaseProtocol (via ProcessProtocol):

Method connectionMade Called when a connection is made.
Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
@classmethod
def run(cls, reactor, argv, env): (source)

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): (source)

Undocumented

def getResult(self): (source)

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

def outReceived(self, bytes): (source)

Accumulate output from the child process in a list.

def parseChunks(self, bytes): (source)

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

def processEnded(self, reason): (source)

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

Undocumented

requests = (source)

Undocumented

def _fireResultDeferreds(self, result): (source)

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