[Python-Dev] Re: Re: subprocess - updated popen5 module

Fredrik Lundh fredrik at pythonware.com
Sat Oct 9 13:06:36 CEST 2004


Peter Astrand wrote:

> > Am I missing something? Can these be renamed now before it gets
> > standardized?
>
> I'd prefer not to rename the call() function. The name is short and
> simple, and the function is very much used. I'm positive to renaming the
> callv() function, though. One obvious name would be "calll", but that's
> quite ugly. How about "lcall"? Then we can keep the "callv" name for
> backwards compatibility.

do we need both?  you could rename "callv" to "call", and let people type
an extra "*" if they want to pass in a list of arguments:

    subprocess.call("stty", "sane", "-F", device)
    subprocess.call(*["stty", "sane", "-F", device])

or, more likely:

    args = ["somecommand"]
    # several lines of code to add options and parameters
    # to the args list
    subprocess.call(*args)

> Or, we could just keep the "callv" name, and pretend that "v" stands for
> "variable number of arguments".

I have no problem with that...

</F> 





More information about the Python-Dev mailing list