1

My Jython wait() is not waiting before executing the next batch file?

import subprocess

command = '%s' % (sBatFile)
pipe = subprocess.Popen(command, shell=False, cwd=sBatDir)
out, err = pipe.communicate()
retCode = pipe.wait()

if retCode <> 0:
    return retCode
else:
    return 0

I expect the return code to return 0, after the batch file completes. It's returning 0 but before the batch file completes execution??

0 Answers0