On Thu, Jun 12, 2014 at 12:07 PM, Chris Angelico <ros...@gmail.com
    <mailto:ros...@gmail.com>> wrote:
     > ISTM what you want is not shell=True, but a separate function that
     > follows the system policy for translating a command name into a
     > path-to-binary.

According to the docs, subprocess.Popen should already be
doing this on Unix:

   On Unix, with shell=False (default): In this case, the Popen class
   uses os.execvp() to execute the child program.

and execvp() searches the user's PATH to find the program.

However, it says the Windows version uses CreateProcess, which
doesn't use PATH.

This seems like an unfortunate platform difference to me. It
would be better if PATH were searched on both platforms, or
better still, make it an option independent of shell=True.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to