[Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted? (original) (raw)
James C. Ahlstrom jim@interet.com
Thu, 09 Mar 2000 15:20:23 -0500
- Previous message: [Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted?
- Next message: [Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tim Peters wrote:
Screw the docs. Pretend you're a newbie and try it.
I did try it.
import os p = os.popen("dir") while 1: line = p.readline() if not line: break print line Type that in by hand, or stick it in a file & run it from a cmdline python.exe (which is a Windows console program). Under Win95 the process freezes solid, and even trying to close the DOS box doesn't work. You have to bring up the task manager and kill it that way. I once traced this under
Point on the curve: This program works perfectly on my machine running NT.
libc pipes ares as flaky as libc popen under Windows, Jim! MarkH has the only versions of these things that come close to working under Windows (he wraps the native Win32 spellings of these things; MS's libc entry points (which Python uses now) are much worse).
I believe you when you say popen() is flakey. It is a little harder to believe it is not possible to write a _popen() replacement using pipes which works.
Of course I wanted you to do it instead of me! Well, if I get any time before 1.6 comes out...
JimA
- Previous message: [Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted?
- Next message: [Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]