Index: Lib/subprocess.py =================================================================== --- Lib/subprocess.py (revision 78823) +++ Lib/subprocess.py (working copy) @@ -389,7 +389,6 @@ """ import sys -mswindows = (sys.platform == "win32") import os import types @@ -412,6 +411,15 @@ return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) +try: + import _subprocess +except ImportError: + mswindows = False +else: + mswindows = True + del _subprocess + + if mswindows: import threading import msvcrt