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 cvrebert
Recipients Alexander.Belopolsky, Arfrever, asvetlov, brian.curtin, csernazs, cvrebert, dstanek, eric.araujo, eric.smith, giampaolo.rodola, holdenweb, larry, ncoghlan, r.david.murray, vstinner
Date 2012-04-01.06:58:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333263489.29.0.672519296645.issue7839@psf.upfronthosting.co.za>
In-reply-to
Content
> The reason I'm not a fan is the fact that, with "shell=True", you can use the *executable* argument to Popen to select a non-default shell. At that point, passing a list can make sense, even if it isn't useful for the default shell.

Modulo Windows, at that point, why not just run the shell explicitly (i.e. shell=False, args=['my_sh', ...])? Also, a '-c' argument will be forcibly prepended to the passed-in `args` in your case, which may frustrate such use-cases.

> For the other way around, passing a string with "shell=False" can be a straightforward way to launch GUI applications from a script.

And they may need to eventually pass it (an) argument(s), and when that happens, cue confusion! There's a reason the `subprocess` docs feature the not-strictly-necessary clause "[a str `args` w/ shell=False] will only work if the program is being given no arguments". The distinction regularly trips/tripped users up.
History
Date User Action Args
2012-04-01 06:58:09cvrebertsetrecipients: + cvrebert, holdenweb, csernazs, ncoghlan, vstinner, dstanek, larry, eric.smith, giampaolo.rodola, eric.araujo, Arfrever, r.david.murray, brian.curtin, asvetlov, Alexander.Belopolsky
2012-04-01 06:58:09cvrebertsetmessageid: <1333263489.29.0.672519296645.issue7839@psf.upfronthosting.co.za>
2012-04-01 06:58:08cvrebertlinkissue7839 messages
2012-04-01 06:58:08cvrebertcreate