I have below scripts
1)
  os.chdir("C:\\RTM3Run_Full\\Python Codes")
  os.startfile("2015_RUNcvm_64_Crash.bat")
2)
 for i in range(settings.loop):
    ....
I want to start the "for i in range(settings.loop):" section (i.e. part 2)after the batch file is completely finished. But it only runs part 1) and part 2) in parallel. I know I should be able to set up a pause function to wait. But I don't know how long part 1) takes. Anyone know there is other smarter way to run 1) and 2) in sequence?
Many thanks.
 
     
    