classification
Title: subprocess: weird behavior with shell=True and args being a list
Type: Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder: subprocess.check_output() docs misrepresent what shell=True does
View: 20344
Assigned To: Nosy List: Dimitri Merejkowsky, martin.panter
Priority: normal Keywords:

Created on 2017-04-11 10:04 by Dimitri Merejkowsky, last changed 2017-04-11 10:31 by martin.panter. This issue is now closed.

Messages (2)
msg291473 - (view) Author: Dimitri Merejkowsky (Dimitri Merejkowsky) * Date: 2017-04-11 10:04
If you have:

subprocess.run(["ls", "--help"], shell=True)

you'll see that the command run is actually just "ls", not "ls --help"
msg291475 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2017-04-11 10:31
This is as documented, but perhaps see Issue 20344 about clarifying the documentation.
History
Date User Action Args
2017-04-11 10:31:41martin.pantersetstatus: open -> closed

superseder: subprocess.check_output() docs misrepresent what shell=True does

nosy: + martin.panter
messages: + msg291475
resolution: not a bug
stage: resolved
2017-04-11 10:04:41Dimitri Merejkowskycreate