[ python-Bugs-1057061 ] subprocess on Windows: extra windows
SourceForge.net
noreply at sourceforge.net
Sun Nov 7 15:33:39 CET 2004
Bugs item #1057061, was opened at 2004-10-29 23:49
Message generated for change (Comment added) made by astrand
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1057061&group_id=5470
Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Russell Owen (reowen)
Assigned to: Nobody/Anonymous (nobody)
Summary: subprocess on Windows: extra windows
Initial Comment:
My understanding was that subprocess.py was supposed to be
backwards compatible with at least Python 2.3 if not 2.2. Wanting
subprocess and backwards compatibility, I grabbed the subprocess.py
from 2.4b1, changed the import if so that win32api was used (since I
had no _subprocess library!) and found several problems, of which
this is is the mildes:
when using subprocess.Popen on Windows I get one or more windows
called C:\WINNT\system32\CMD.EXE popping up. Sometimes they
stick around, other times they are only around for a short time. Note
that I don't see this probem using os.popen3 (on the
other hand, os.popen3 has inferior error handling).
The following code is one example:
from subprocess import *
Popen("ds9 -title foo", shell=True, cwd="C:\Program Files\ds9\")
----------------------------------------------------------------------
>Comment By: Peter Åstrand (astrand)
Date: 2004-11-07 15:33
Message:
Logged In: YES
user_id=344921
This happens because cmd.exe/command.com opens a window by
default. To get rid of this, we need to pass SW_HIDE to
startupinfo.wShowWindow.
I've fixed this in revision 1.8 of subprocess.py and
revision 1.3 of _subprocess.py: When using shell=True,
SW_HIDE is now default.
----------------------------------------------------------------------
Comment By: Russell Owen (reowen)
Date: 2004-11-03 20:02
Message:
Logged In: YES
user_id=431773
I am using Windows 2000 Professional.
----------------------------------------------------------------------
Comment By: Peter Åstrand (astrand)
Date: 2004-10-31 08:09
Message:
Logged In: YES
user_id=344921
Which Windows version are you using?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1057061&group_id=5470
More information about the Python-bugs-list
mailing list