[Python-checkins] cpython (3.1): Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of the

brian.curtin python-checkins at python.org
Fri Apr 29 23:29:16 CEST 2011


http://hg.python.org/cpython/rev/80971f71b0d9
changeset: 69689:80971f71b0d9
branch: 3.1
parent: 69680:1d3c5df88589
user: Brian Curtin <brian at python.org>
date: Fri Apr 29 15:48:13 2011 -0500
summary:
 Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of the
constants to be used for STARTUPINFO were exposed due to the change.
files:
 Lib/subprocess.py | 11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -344,7 +344,6 @@
 
 
 if mswindows:
- from _subprocess import CREATE_NEW_CONSOLE
 import threading
 import msvcrt
 import _subprocess
@@ -372,7 +371,15 @@
 "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:
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /