Message157259
> 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. |
|
Date |
User |
Action |
Args |
2012-04-01 06:58:09 | cvrebert | set | recipients:
+ 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:09 | cvrebert | set | messageid: <1333263489.29.0.672519296645.issue7839@psf.upfronthosting.co.za> |
2012-04-01 06:58:08 | cvrebert | link | issue7839 messages |
2012-04-01 06:58:08 | cvrebert | create | |
|