class documentation

class twisted.mail.alias.ProcessAlias(AliasBase): (source)

Implements interfaces: twisted.mail.interfaces.IAlias

View In Hierarchy

An alias which is handled by the execution of a program.

Instance Variable path The arguments to pass to the process. The first string is the executable's name.
Instance Variable program The path of the program to be executed.
Instance Variable reactor A reactor which will be used to create and timeout the child process.
Method __init__
Method __str__ Build a string representation of this ProcessAlias instance.
Method spawnProcess Spawn a process.
Method createMessageReceiver Launch a process and create a message receiver to pass a message to the process.

Inherited from AliasBase:

Instance Variable domains See __init__.
Instance Variable original The original address being aliased.
Method domain Return the domain associated with original address.
Method resolve Map this alias to its ultimate destination.
path = (source)
The arguments to pass to the process. The first string is the executable's name.
(type: list of bytes)
program = (source)
The path of the program to be executed.
(type: bytes)
reactor = (source)
A reactor which will be used to create and timeout the child process.
(type: IReactorTime and IReactorProcess provider)
def __init__(self, path, *args): (source)
ParameterspathThe command to invoke the program consisting of the path to the executable followed by any arguments. (type: bytes)
argsArguments for AliasBase.__init__. (type: 2-tuple of (0) dict mapping bytes to IDomain provider, (1) bytes)
def __str__(self): (source)

Build a string representation of this ProcessAlias instance.

ReturnsA string containing the command used to invoke the process. (type: bytes)
def spawnProcess(self, proto, program, path): (source)

Spawn a process.

This wraps the spawnProcess method on reactor so that it can be customized for test purposes.

ParametersprotoAn object which will be notified of all events related to the created process. (type: IProcessProtocol provider)
programThe full path name of the file to execute. (type: bytes)
pathThe arguments to pass to the process. The first string should be the executable's name. (type: list of bytes)
ReturnsA process transport. (type: IProcessTransport provider)
def createMessageReceiver(self): (source)

Launch a process and create a message receiver to pass a message to the process.

ReturnsA message receiver which delivers a message to the process. (type: MessageWrapper)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.