get the output from a subprocess
import subprocess stdoutdata = subprocess.getoutput("ls") print(stdoutdata.split())