On Fri, Jun 13, 2014 at 12:11 PM, Nikolaus Rath <Nikolaus at rath.org> wrote: > Can someone describe an use case where shell=True actually makes sense > at all? > > It seems to me that whenever you need a shell, the argument's that you > pass to it will be shell specific. So instead of e.g. > > Popen('for i in `seq 42`; do echo $i; done', shell=True) > > you almost certainly want to do > > Popen(['/bin/sh', 'for i in `seq 42`; do echo $i; done'], shell=False) > > because if your shell happens to be tcsh or cmd.exe, things are going to > break. Some features, while technically shell-specific, are supported across a lot of shells. You should be able to pipe output from one command into another in most shells, for instance. But yes, I generally don't use it. ChrisA
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4