subprocess.getoutput(cmd)
Return output (stdout and stderr) of executing cmd in a shell.
Like getstatusoutput()
, except the exit status is ignored and the return value is a string containing the command’s output. Example:
>>> subprocess.getoutput('ls /bin/ls') '/bin/ls'
Availability: POSIX & Windows
Changed in version 3.3.4: Windows support added
Please login to continue.