This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Anthony Sottile, eryksun, paul.moore, steve.dower, tim.golden, zach.ware, Александр Бондарев
Date 2018-06-15.09:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529053467.51.0.947875510639.issue25815@psf.upfronthosting.co.za>
In-reply-to
Content
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, which doesn't strip quotes from the string.

subprocess.list2cmdline implements quoting that's meant for applications that use the VC++ [w]main argv array, or the CommandLineToArgvW WinAPI function. It can't take into account custom command-line parsing of all applications. If this echo.exe doesn't work right with an args list, then use a custom command line -- *without* shell=True.
History
Date User Action Args
2018-06-15 09:04:27eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, Anthony Sottile, Александр Бондарев
2018-06-15 09:04:27eryksunsetmessageid: <1529053467.51.0.947875510639.issue25815@psf.upfronthosting.co.za>
2018-06-15 09:04:27eryksunlinkissue25815 messages
2018-06-15 09:04:27eryksuncreate