15 bindir = os.path.dirname(cmd[0]);
18 env[
'PATH'] += os.pathsep + bindir
23 proc = subprocess.Popen(
24 cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
25 while proc.returncode
is None:
27 stdout, stderr = proc.communicate()
31 if proc.returncode == 0:
35 return proc.returncode
37if __name__ ==
'__main__':
38 sys.exit(
run(sys.argv[1:]))
def print(*args, **kwargs)