[Python-checkins] python/dist/src/Lib subprocess.py,1.4,1.5
effbot at users.sourceforge.net
effbot at users.sourceforge.net
Wed Oct 13 20:19:23 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14799/Lib
Modified Files:
subprocess.py
Log Message:
Replace dynamic try/except with "if 0", to keep py2exe happy. If you
want to use pywin32 instead of _subprocess, you have to edit the file.
Index: subprocess.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- subprocess.py 13 Oct 2004 03:15:00 -0000 1.4
+++ subprocess.py 13 Oct 2004 18:19:18 -0000 1.5
@@ -367,16 +367,7 @@
if mswindows:
import threading
import msvcrt
- try:
- from _subprocess import *
- class STARTUPINFO:
- dwFlags = 0
- hStdInput = None
- hStdOutput = None
- hStdError = None
- class pywintypes:
- error = IOError
- except ImportError:
+ if 0: # <-- change this to use pywin32 instead of the _subprocess driver
import pywintypes
from win32api import GetStdHandle, STD_INPUT_HANDLE, \
STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
@@ -388,6 +379,15 @@
GetExitCodeProcess, STARTF_USESTDHANDLES, \
CREATE_NEW_CONSOLE
from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
+ else:
+ from _subprocess import *
+ class STARTUPINFO:
+ dwFlags = 0
+ hStdInput = None
+ hStdOutput = None
+ hStdError = None
+ class pywintypes:
+ error = IOError
else:
import select
import errno
More information about the Python-checkins
mailing list