I am running the following piece of code (call it batch.py)
for config in keystoneConfig:
cmdlist = generate_cmd_list(config)
print ' '.join(cmdlist)
subprocess.call(cmdlist)
And redirecting the output of batch.py to another file. i.e.
./batch.py > output.txt
But I realize that all the output from subprocess.call()
goes before the print
statement. Why is the output out of sync?