Issue 13195: subprocess: args with shell=True is not documented on Windows (original) (raw)

Created on 2011-10-17 11:21 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg145662 - (view) Author: anatoly techtonik (techtonik) Date: 2011-10-17 11:21
For UNIX, it is said that if shell=False then you need to pass `args` as a list (if you want to pass any parameters to executable). Is that true for Windows (and perhaps other platforms) as well? Again, for UNIX it is said that with shell=True, and args is a list - every item except the first one is an argument to the shell itself. Is it the same on Windows? It would be better to just give advice in `shell` parameter description to "pass args as a list with shell=False or else you'll lose params in Unix. If shell=True you need to pass args as a string, because list is needed only if you need to pass arguments to shell itself."
msg145663 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-17 11:24
See also issues #7839, #8972 and #10197.
msg145671 - (view) Author: anatoly techtonik (techtonik) Date: 2011-10-17 11:48
Looks like a can of worms. For now I'll be pretty fine if this stuff is at least properly documented.
msg145672 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-17 11:50
> For now I'll be pretty fine if this stuff is at least > properly documented. Can you propose a document patch describing the current behaviour?
msg145674 - (view) Author: anatoly techtonik (techtonik) Date: 2011-10-17 12:01
Certainly not right now as I don't have development environment setup. Perhaps in a few days if somebody pings me. It could be a lot easier with online editor, of course - http://code.google.com/p/pydotorg/issues/detail?id=6
msg145677 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-17 12:24
> Certainly not right now as I don't have development environment setup See our development guide to get such environment: http://docs.python.org/devguide/setup.html > It could be a lot easier with online editor Would like like to work on this project? (provide an online editor)
msg145726 - (view) Author: anatoly techtonik (techtonik) Date: 2011-10-17 16:22
On Mon, Oct 17, 2011 at 3:24 PM, STINNER Victor <report@bugs.python.org> wrote: > >> Certainly not right now as I don't have development environment setup > > See our development guide to get such environment: > http://docs.python.org/devguide/setup.html I know. There is better tool at https://bitbucket.org/techtonik/devinabox but I have only 500Mb left on my system drive and there are still more problems I need to handle. >> It could be a lot easier with online editor > > Would like like to work on this project? (provide an online editor) Do you mean would I like to work on it? Actually, I made a prototype on AppEngine that waits for JS guru to tune CodeMirror interface. If somebody is interested to help, I've just uploaded the code to http://code.google.com/p/pydotorg/source/browse/?repo=doceditor
msg253166 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-10-19 01:21
I think the documentation changes made for Issue 16115 should address your first question (shell=False). For shell=True, see the discussion at Issue 20344. Perhaps you can review my patch.
History
Date User Action Args
2022-04-11 14:57:22 admin set github: 57404
2015-10-19 01:21:59 martin.panter set status: open -> closeddependencies: + test the executable arg to Popen() and improve related docssuperseder: subprocess.check_output() docs misrepresent what shell=True doesnosy: + martin.pantermessages: + resolution: duplicate
2011-10-17 16:22:45 techtonik set messages: +
2011-10-17 14:00:59 Arfrever set nosy: + Arfrever
2011-10-17 12:24:22 vstinner set messages: +
2011-10-17 12:12:14 rosslagerwall set nosy: + rosslagerwall
2011-10-17 12:01:58 techtonik set messages: +
2011-10-17 11:50:10 vstinner set messages: +
2011-10-17 11:48:17 techtonik set messages: +
2011-10-17 11:24:20 vstinner set nosy: + vstinnermessages: +
2011-10-17 11:21:33 techtonik create