python comando bash
import os
os.system('clear')
Come eseguire bash script in python
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
python esegue un comando di sistema
import os
cmd = "git --version"
returned_value = os.system(cmd) # returns the exit code in unix
come eseguire comandi bash script in python
import subprocess
subprocess.call(["sudo", "apt", "update"])