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 iMath
Recipients docs@python, iMath
Date 2017-04-16.03:10:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492312204.85.0.288489442565.issue30079@psf.upfronthosting.co.za>
In-reply-to
Content
The doc here 
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
says :
"If shell is True, it is recommended to pass args as a string rather than as a sequence."
but without explain why ? Please add the explanation !
while in
https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
says:
"args is required for all calls and should be a string, or a sequence of program arguments. Providing a sequence of arguments is generally preferred, as it allows the module to take care of any required escaping and quoting of arguments (e.g. to permit spaces in file names). If passing a single string, either shell must be True (see below) or else the string must simply name the program to be executed without specifying any arguments."

In the case of shell =True ,  I found providing a sequence of arguments  rather than  a string argument can take the advantage of auto escaping and quoting of arguments (e.g. to permit spaces in file names) , so what is the advantage of pass args as a string rather than as a sequence as says in the doc when shell is True?
History
Date User Action Args
2017-04-16 03:10:04iMathsetrecipients: + iMath, docs@python
2017-04-16 03:10:04iMathsetmessageid: <1492312204.85.0.288489442565.issue30079@psf.upfronthosting.co.za>
2017-04-16 03:10:04iMathlinkissue30079 messages
2017-04-16 03:10:03iMathcreate