If I run echo a; echo b in bash the result will be that both commands are run. However if I use subprocess then the first command is run, printing out the whole
echo a; echo b
If you're only running the commands in one shot then you can just use subprocess.check_output convenience function:
def subprocess_cmd(command): output = subprocess.check_output(command, shell=True) print output