A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-June/135090.html below:

[Python-Dev] subprocess shell=True on Windows doesn't escape ^ character

[Python-Dev] subprocess shell=True on Windows doesn't escape ^ characterGreg Ewing greg.ewing at canterbury.ac.nz
Sun Jun 15 01:15:27 CEST 2014
>     On Thu, Jun 12, 2014 at 12:07 PM, Chris Angelico <rosuav at gmail.com
>     <mailto:rosuav at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4