call(cmd,
encoding=' utf-8 ' ,
shell=False,
check_exit_code=True,
timeout=None)
| source code
|
Calls a subprocess and returns the output and optionally exit
code.
- Parameters:
encoding - convert output to unicode objects with this encoding, set to None
to get the raw output
check_exit_code - set to False to ignore the exit code, otherwise any non-zero
result will throw BadExitCode.
timeout - If specified only this amount of time (seconds) will be waited
for the subprocess to return
- Returns:
- If check_exit_code is False: list( output, exit_code ), else just
the output
|