subprocess.getstatusoutput()

subprocess.getstatusoutput(cmd) Return (status, output) of executing cmd in a shell. Execute the string cmd in a shell with Popen.check_output() and return a 2-tuple (status, output). Universal newlines mode is used; see the notes on Frequently Used Arguments for more details. A trailing newline is stripped from the output. The exit status for the command can be interpreted according to the rules for the C function wait(). Example: >>> subprocess.getstatusoutput('ls /bin/ls') (0, '/

subprocess.CompletedProcess.stdout

stdout Captured stdout from the child process. A bytes sequence, or a string if run() was called with universal_newlines=True. None if stdout was not captured. If you ran the process with stderr=subprocess.STDOUT, stdout and stderr will be combined in this attribute, and stderr will be None.

subprocess.CompletedProcess.returncode

returncode Exit status of the child process. Typically, an exit status of 0 indicates that it ran successfully. A negative value -N indicates that the child was terminated by signal N (POSIX only).

subprocess.CompletedProcess.stderr

stderr Captured stderr from the child process. A bytes sequence, or a string if run() was called with universal_newlines=True. None if stderr was not captured.

subprocess.check_output()

subprocess.check_output(args, *, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None) Run command with arguments and return its output. If the return code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and any output in the output attribute. This is equivalent to: run(..., check=True, stdout=PIPE).stdout The arguments shown above are merely the most common ones. The full function signa

subprocess.CompletedProcess

class subprocess.CompletedProcess The return value from run(), representing a process that has finished. args The arguments used to launch the process. This may be a list or a string. returncode Exit status of the child process. Typically, an exit status of 0 indicates that it ran successfully. A negative value -N indicates that the child was terminated by signal N (POSIX only). stdout Captured stdout from the child process. A bytes sequence, or a string if run() was called wi

subprocess.CompletedProcess.check_returncode()

check_returncode() If returncode is non-zero, raise a CalledProcessError.

subprocess.check_call()

subprocess.check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None) Run command with arguments. Wait for command to complete. If the return code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. This is equivalent to: run(..., check=True) (except that the input parameter is not supported) The arguments shown above are merely the most common ones. The full function signatu

subprocess.CompletedProcess.args

args The arguments used to launch the process. This may be a list or a string.

subprocess.CalledProcessError

exception subprocess.CalledProcessError Subclass of SubprocessError, raised when a process run by check_call() or check_output() returns a non-zero exit status. returncode Exit status of the child process. If the process exited due to a signal, this will be the negative signal number. cmd Command that was used to spawn the child process. output Output of the child process if it was captured by run() or check_output(). Otherwise, None. stdout Alias for output, for symmetr