[Python-Dev] Fix to allow os.popen to work from pythonw.exe
Guido van Rossum
Sat, 08 Jul 2000 09:34:14 -0500
> os.popen fails to work if pythonw.exe is used to start python. This is
> true for 1.5.2 and 1.6a2.
> The root cause of the problem is in the Microsoft C RTL implementation
> of _popen(). _popen() will fail if there is not a valid file descriptor
> for stdin or stdout.
> The following replacement for WinMain.c works around the problem.
> I also ensure a valid descriptor for stderr for completeness.
> This was compiled and test under VC++ 6.0 SP3 on Windows 2000.
Let's also test it on Windows 98, 95 and NT. If it works for all, I'm
--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)