[Python-Dev] FW: Fixing os.popen on Win32 => is the win32pipe stuff going to be adopted?

James C. Ahlstrom jim@interet.com
Fri, 10 Mar 2000 16:14:45 -0500

Tim Peters wrote:
> [Fred L. Drake, Jr.]
> > Tim (& others),
> >   Would this additional text be sufficient for the os.popen()
> > documentation?
> >
> >       \strong{Note:} This function behaves unreliably under Windows
> >         due to the native implementation of \cfunction{popen()}.
> Yes, that's good!  If Mark/Bill's alternatives don't make it in, would also
> be good to point to the PythonWin extensions (although MarkH will have to
> give us the Official Name for that).

Well, it looks like this thread has fizzled out.  But what did we

Changing the docs to say popen() "doesn't work reliably" is
a little weak.  Maybe removing popen() is better, and demanding
that Windows users use win32pipe.

I played around with a patch to posixmodule.c which eliminates
_popen() and implements os.popen() using CreatePipe().  It
sort of works on NT and fails on 95.  Anyway, I am stuck on
how to make a Python file object from a pipe handle.

Would it be a good idea to extract the Wisdom from win32pipe
and re-implement os.popen() either in C or by using win32pipe
directly?  Using C is simple and to the point.

I feel Tim's original complaint that popen() is a Problem
still hasn't been fixed.