run python scripts in bash code example
Example 1: How to run bash script in python
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
Example 2: python how to run terminal command
#By Uku Loskit
import os
os.system("ls -l")
Example 3: call shell script from python
import subprocess
subprocess.call(["./shell.sh"])
# Make sure that "shell.sh" has "+x" permissions