using bash script to execute python code example
Example 1: How to run bash script in python
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
Example 2: bash script python
subscription-manager register --username=admin --password=secret