Suppose I have three Python script named script1.py, script2.py, script3
.py
I want to write another python script named Allscript.py
which contain the all the above 3 script name along with their path. Note that all the three scripts are in different location. Let path of script1 is at C:\abc\script1.py, script2 is at C:\pqr\script2.py, script3 is at C:\xyz\script3.py
My requirement is I want to run the script one after another, first it will run script1, then after successful completion of script1 it will run script2 and so on.
I find the below script from stackoverflow. I want something like that. Please in Answer provide me that script which can execute all the 3 python script.
import os
print "Starting script1"
os.system("python script1.py arg1 arg2 arg3")
print "script1 ended"
print "Starting script2"
os.system("python script2.py arg1 arg2 arg3")
print "script2 ended"
print "Starting script3"
os.system("python script3.py arg1 arg2 arg3")
print "script3 ended"