[issue25815] Improper subprocess output of arguments with braces in them on windows

2018-06-15 Thread Eryk Sun
Eryk Sun added the comment: With a stock Windows system, `subprocess.check_output(['echo', "'hello'"])` fails because there is no "echo.exe". That's a 3rd party program that you installed. `subprocess.check_output("echo 'hello'", shell=True)` uses the CMD shell's internal `echo` command,

[issue25815] Improper subprocess output of arguments with braces in them on windows

2018-06-15 Thread Александр Бондарев
Александр Бондарев added the comment: Can you please re-open this bug? I'm not agree that this a correct behavior. Usually we are using subprocess.check_output([..]) version to not aware about argument escaping and it works good for Linux. In example: > subprocess.check_output(['echo',

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Eryk Sun
Eryk Sun added the comment: Using the cmd shell's "echo" command requires shell=True. You must have an "echo.exe" somewhere in your PATH. Check "where echo" in cmd. -- nosy: +eryksun ___ Python tracker

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: It *is* in my path (otherwise it wouldn't produce any output at all). I'm not trying to use the shell builtin, I'm trying to use the executable. -- resolution: not a bug -> status: closed -> open ___ Python

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: To clarify further, the echo.exe on my path reacts correctly: ``` Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit (allow_curly_braces_in_args) $ /usr/bin/echo hi{1} hi{1} Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
New submission from Anthony Sottile: First some expected output: ``` # from cmd.exe C:\Users\Anthony>echo hi{1} hi{1} # from MINGW $ echo hi{1} hi{1} ``` ``` # On ubuntu $ echo 'hi{1}' hi{1} $ python3.5 -c "import subprocess; print(subprocess.check_output(('echo', 'hi{1}')))" b'hi{1}\n' ```

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Eryk Sun
Eryk Sun added the comment: AFAICT, there's no place where subprocess.Popen would be responsible for removing braces from the output. I think it's something unusual with the "echo.exe" program. In the cmd.exe shell -- i.e. no msys, bash, etc -- what do you get for the following?

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: ``` C:\Users\Anthony> C:\Users\Anthony\AppData\Local\Programs\Git\usr\bin\echo.exe hi{1} hi1 ``` Must be the provider of echo.exe. I'll take it up with them Sorry for the trouble! -- resolution: -> not a bug status: open -> closed

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> resolved ___ Python tracker ___ ___