1import subprocess
2process = subprocess.Popen(['echo', 'More output'],
3 stdout=subprocess.PIPE,
4 stderr=subprocess.PIPE)
5stdout, stderr = process.communicate()
6stdout, stderr
7
1import os
2
3os.system("ma Commande")
4
5#Exemple:
6
7os.system("cd Documents")
1import os
2cmd = "git --version"
3returned_value = os.system(cmd) # returns the exit code in unix