twisted.internet.utils.getProcessOutput(executable, args=(), env={}, path=None, reactor=None, errortoo=0)
function documentationtwisted.internet.utils
View Source
Spawn a process and return its output as a deferred returning a string.
Parameters | executable | The file name to run and get the output of - the full path should be used. |
args | the command line arguments to pass to the process; a sequence of strings. The first string should NOT be the executable's name. | |
env | the environment variables to pass to the processs; a dictionary of strings. | |
path | the path to run the subprocess in - defaults to the current directory. | |
reactor | the reactor to use - defaults to the default reactor | |
errortoo | If true, include stderr in the result. If false, if stderr is received the
returned Deferred will
errback with an IOError
instance with a processEnded attribute. The
processEnded attribute refers to a Deferred which
fires when the executed process ends. |