phython call a shell script code example
Example 1: python bash command
import os
os.system('clear')
Example 2: call shell script from python
import subprocess
subprocess.call(["./shell.sh"])
# Make sure that "shell.sh" has "+x" permissions
import os
os.system('clear')
import subprocess
subprocess.call(["./shell.sh"])
# Make sure that "shell.sh" has "+x" permissions