Run shell script in python

Make sure that has execution permissions, and run it :

#!/usr/bin/pythonimport subprocessprint ("start")"./")print ("end")

If someone looking for calling a script with arguments

import subprocessval = subprocess.check_call("./ '%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 required

subprocess.check_call("./script.ksh %s %s %s" % (agr1, str(arg2), arg3),   shell=True)