command line - Run programmes in a sequence using python -


this question has answer here:

i have python programme below

import os import subprocess m in range(0,10):     os.chdir("c:/")     run="my command%d"%m     subprocess.popen(run).wait()        

where 'my command' used launch programme. although have wait() after popen, turns out 10 programmes still run simultaneously, not expected. how settle issue?

two options:

also, datetime.datetime.now() gives microsecond, can see time granularity higher 1s.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -