I have a problem with the following code:
callBash.py:
import subprocess
print \"start\"
subprocess.call(\"sleep.sh\")
print \"end\"
If someone looking for calling a script with arguments
import subprocess
val = subprocess.check_call("./script.sh '%s'" % arg, shell=True)
Remember to convert the args to string before passing, using str(arg).
This can be used to pass as many arguments as desired:
subprocess.check_call("./script.ksh %s %s %s" % (arg1, str(arg2), arg3), shell=True)