Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of the

constants to be used for STARTUPINFO were exposed due to the change.
This commit is contained in:
Brian Curtin 2011-04-29 15:48:13 -05:00
parent 2ee88355fc
commit 8b8e7f467f
1 changed files with 9 additions and 2 deletions

View File

@ -344,7 +344,6 @@ class CalledProcessError(Exception):
if mswindows:
from _subprocess import CREATE_NEW_CONSOLE
import threading
import msvcrt
import _subprocess
@ -372,7 +371,15 @@ __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput",
"getoutput", "check_output", "CalledProcessError"]
if mswindows:
__all__.append("CREATE_NEW_CONSOLE")
from _subprocess import (CREATE_NEW_CONSOLE,
STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
STD_ERROR_HANDLE, SW_HIDE,
STARTF_USESTDHANDLES, STARTF_USESHOWWINDOW)
__all__.extend(["CREATE_NEW_CONSOLE",
"STD_INPUT_HANDLE", "STD_OUTPUT_HANDLE",
"STD_ERROR_HANDLE", "SW_HIDE",
"STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW"])
try:
MAXFD = os.sysconf("SC_OPEN_MAX")
except: