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 akira
Recipients akira, docs@python
Date 2014-04-24.19:08:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398366522.65.0.954174735085.issue21347@psf.upfronthosting.co.za>
In-reply-to
Content
*Popen(["something"], shell=True)* works but it is similar to
*Popen(["something", "arg"], shell=True)* that passes "arg" to /bin/sh on POSIX systems instead of "something".

It is best to always use a string if `shell=True` is necessary.

It is a common confusion #20344, msg98732, #7839

http://stackoverflow.com/questions/21029154/understanding-python-subprocess-check-outputs-first-argument-and-shell-true
http://stackoverflow.com/questions/20787712/start-openoffice-process-with-python-to-use-with-pyuno-using-subprocess
http://stackoverflow.com/questions/17880847/python-subprocess-error-in-using-cp
http://stackoverflow.com/questions/17226912/why-does-simple-echo-in-subprocess-not-working
http://stackoverflow.com/questions/15109665/subprocess-call-using-string-vs-using-list
http://stackoverflow.com/questions/20128114/pythons-subprocess-does-not-interpret-as-expected-on-cygwin
http://stackoverflow.com/questions/16840427/python-on-linux-subprocess-popen-works-weird-with-shell-true
...
History
Date User Action Args
2014-04-24 19:08:42akirasetrecipients: + akira, docs@python
2014-04-24 19:08:42akirasetmessageid: <1398366522.65.0.954174735085.issue21347@psf.upfronthosting.co.za>
2014-04-24 19:08:42akiralinkissue21347 messages
2014-04-24 19:08:42akiracreate