import subprocess proc = subprocess.Popen([cmd_array],stdout=subprocess.PIPE) print(proc.stdout.read())