spawnProcess(self,
processProtocol,
executable,
args=(),
env={},
path=None,
uid=None,
gid=None,
usePTY=0)
Spawn a process, with a process protocol.
-
- Parameters:
processProtocol -
a ProcessProtocol instance
executable -
the file name to spawn - the full path should be used.
args -
the command line arguments to pass to the process; a sequence of
strings. The first string should be the executable's name.
env -
the environment variables to pass to the processs; a dictionary of
strings. If 'None', use os.environ.
path -
the path to run the subprocess in - defaults to the current
directory.
uid -
user ID to run the subprocess as. (Only available on POSIX
systems.)
gid -
group ID to run the subprocess as. (Only available on POSIX
systems.)
usePTY -
if true, run this process in a pseudo-terminal. optionally a tuple of
(masterfd, slavefd, ttyname), in which case use those file
descriptors. (Not available on all systems.)
See also: twisted.internet.protocol.ProcessProtocol
|