class IProcessTransport(ITransport): (source)
Known subclasses: twisted.internet.endpoints._IProcessTransportWithConsumerAndProducer
Known implementations: twisted.internet._dumbwin32proc.Process
, twisted.internet.process.Process
, twisted.internet.process.PTYProcess
A process transport.
Method | close |
Close a file descriptor which is connected to the child process, identified by its FD in the child process. |
Method | close |
Close stderr. |
Method | close |
Close stdin after all data has been written out. |
Method | close |
Close stdout. |
Method | lose |
Close stdin, stderr and stdout. |
Method | signal |
Send a signal to the process. |
Method | write |
Similar to ITransport.write but also allows the file descriptor in the child process which will receive the bytes to be specified. |
Attribute | pid |
From before IProcessProtocol.makeConnection is called to before IProcessProtocol.processEnded is called, pid is an int giving the platform process ID of this process. pid is None at all other times. |
Inherited from ITransport
:
Method | get |
Similar to getPeer, but returns an address describing this side of the connection. |
Method | get |
Get the remote address of this connection. |
Method | write |
Write some data to the physical connection, in sequence, in a non-blocking fashion. |
Method | write |
Write an iterable of byte strings to the physical connection. |
Close a file descriptor which is connected to the child process, identified by its FD in the child process.
Send a signal to the process.
Parameters | |
signalUnion[ | can be
|
Raises | |
twisted.internet.error.ProcessExitedAlready | If the process has already exited. |
OSError | If the os.kill call fails with an errno different from ESRCH. |
Similar to ITransport.write
but also allows the file descriptor in the child process which will receive the bytes to be specified.
Parameters | |
childint | The file descriptor to which to write. |
data:bytes | The bytes to write. |
Raises | |
KeyError | If childFD is not a file descriptor that was mapped in the child when IReactorProcess.spawnProcess was used to create it. |
From before IProcessProtocol.makeConnection
is called to before IProcessProtocol.processEnded
is called, pid is an int
giving the platform process ID of this process. pid is None
at all other times.