run python through bash code example
Example 1: How to run bash script in python
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
Example 2: call python from bash shell
#!/bin/sh
python python_script.py
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
#!/bin/sh
python python_script.py