python 2.7.12 on Linux behaving differently than on Windows

Chris Angelico rosuav at
Mon Dec 5 10:53:53 EST 2016

On Tue, Dec 6, 2016 at 2:41 AM, BartC <bc at> wrote:
> Are you saying that if someone executes:
>   subprocess.Popen(["python","", "*"])
> the output will be: ['','*']?
> In that case forget Windows vs. Linux, you now have a program that will get
> command parameters processed differently depending on whether it was invoked
> from a shell or not.

Yes, that is correct. *SHELLS DO STUFF*. If you can't comprehend this,
you should get to know your shell. Try this:

python %PATH%

subprocess.Popen(["python", "", "%PATH%"])

Would you expect those to do the same? If you do, prepare for Windows
to surprise you. If you don't, why do you keep expecting other shells
to do nothing?


More information about the Python-list mailing list