help with os.popen()

Tim Peters tim_one at email.msn.com
Sun Apr 25 17:29:31 EDT 1999


[Tim, wrt popen() on Win32]
> I'll figure this all out if I ever get a free year <0.7 wink>.

[Carey Evans]
> Why bother?  The Tcl people have done it already, I've had very few
> problems with pipes there, and it's under a generous license.  There's
> some interesting comments in tclWinPipe.c and stub16.c too, and an
> amazing number of special cases.
>
> I'd be eternally grateful[1] if pipes worked as well in Python as they
> do in Tcl, although I suppose I could try rewriting tclWinPipe.c using
> the Win32 extensions.  Actually, it would be quite nice if I could
> just get the return value from os.system() or os.spawnv() like I can
> from Tcl's "exec".
>
> [1] I'd buy the author a drink if I met them, anyway.

So, Carey, this particular problem bothers you, and you believe you know how
to fix it.  How about buying yourself a drink <0.9 wink>?

After staring at the ~2,700 lines of Tcl source you referenced, my reaction
remains "I'll figure this all out if I ever get a free year".

Hip's original Perl-for-Win32 port shipped its own (non-interactive) 32-bit
shell, so that Perl popen/backtick/system constructs stood some chance of
working.  The latest Perl-for-Win32 source appears to have dropped that,
though, with scattered vague recommendations that you install your own
non-brain-dead PERL5SHELL (4DOS/NT?).

about-to-boost-it-to-two-years<wink>-ly y'rs  - tim






More information about the Python-list mailing list