Yabko
0
Q:

python bash command

import os
os.system('cmd /k "Your Command Prompt Command"')
3
import subprocess
subprocess.call(["sudo", "apt", "update"])
1
import os
cmd = "git --version"
returned_value = os.system(cmd)  # returns the exit code in unix
3
import os
os.system('clear')
1
import subprocess
subprocess.call(["./shell.sh"])

# Make sure that "shell.sh" has "+x" permissions
1

New to Communities?

Join the community