problem using subprocess.call

Fredrik Lundh fredrik at pythonware.com
Thu Oct 26 08:21:02 EDT 2006


Alex Kachanov wrote:

>>    subprocess.call(["find", dir, "-name", "*.zip", "-execdir", "unzip", "{}", ";"])
>
> Ok, thanks, it works.
> But what's the difference? Why I can't pass all parameters as one string?

because there's no one around to split them up for you.

after all, that's the whole point of running another program without going though the
shell: what you pass in ends up, as is, in the other program's argument array.

</F> 






More information about the Python-list mailing list