python 2.7.12 on Linux behaving differently than on Windows

Chris Angelico rosuav at gmail.com
Mon Dec 5 07:23:22 EST 2016


On Mon, Dec 5, 2016 at 10:42 PM, BartC <bc at freeuk.com> wrote:
> At least Windows does it properly. It doesn't even chop the command line
> into different parameters, making it considerably more flexible. (Unless you
> have a program based on a C-style main(nargs,args) entry point where the C
> runtime will do this for you.)

Yes, because there's no way that you can ever get security problems
from improperly parsing command-line arguments. That's why the
recommended way to create a subprocess is os.system(), not the Popen
calls that take a list of already-separated parameters. Right?

ChrisA



More information about the Python-list mailing list