diff options
author | Brian Curtin <brian@python.org> | 2011-04-29 20:48:13 (GMT) |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-04-29 20:48:13 (GMT) |
commit | 8b8e7f467f960390d0d7be2bd6094a4b43fe4091 (patch) | |
tree | 4c690c4216e93a058615a119e15d872dac18e7d8 | |
parent | 2ee88355fc37a32ba5c4b4e5e2e25f52a1d86912 (diff) | |
download | cpython-8b8e7f467f960390d0d7be2bd6094a4b43fe4091.zip cpython-8b8e7f467f960390d0d7be2bd6094a4b43fe4091.tar.gz cpython-8b8e7f467f960390d0d7be2bd6094a4b43fe4091.tar.bz2 |
Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of the
constants to be used for STARTUPINFO were exposed due to the change.
-rw-r--r-- | Lib/subprocess.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index e1c9eed..299f73e 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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: |