cooler piping

Csaba Henk csaba at
Fri Nov 21 13:44:50 CET 2003

In article <1069377379.729708 at yasure>, Donn Cave wrote:
> Quoth Csaba Henk <csaba at>:
> ...
>| is having a function with an execvp-like syntax: if I could do something
>| like os.fancypopen('file', ['file',fname])...
> You may find that popen2.popen2() already comes pretty close to this.
> You may specify a command string, but you also may specify a list of
> strings for execvp.  The only difference is that you supply only the
> argument list, and the file to execute is inferred from its first element.

Thanks, it's cool! Just what I needed... Now I checked, I can pass a list of
strings to os.popen2(), too. 

Only if documentation didn't suck... The Library Reference doesn't mention
anything about the type of the cmd argument of the popen functions, and
after I saw the function working with a cmd of type string, I automatically
assumed that it can be nothing else but a string. (And I don't blame myself
for this...) 


"There's more to life, than books, you know but not much more..."
[The Smiths]
If you want to send me a mail, see it in the mailto link at

More information about the Python-list mailing list