- # TODO: Use Popen once we resolve the problem with msvcrt in Windows:
- (stdin, stdout, stderr) = os.popen3 (cmd)
- # p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
- # (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr)
+ closefds = True
+ if (sys.platform == "mingw32"):
+ closefds = False
+ p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=closefds)
+ (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr)