Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77393 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-09-01 15:39 +1000 |
| Last post | 2014-09-01 15:39 +1000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: subprocess module usage Chris Angelico <rosuav@gmail.com> - 2014-09-01 15:39 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-09-01 15:39 +1000 |
| Subject | Re: subprocess module usage |
| Message-ID | <mailman.13682.1409549990.18130.python-list@python.org> |
On Mon, Sep 1, 2014 at 3:24 PM, Earl Lapus <earl.lapus@gmail.com> wrote: > On Mon, Sep 1, 2014 at 11:55 AM, Chris Angelico <rosuav@gmail.com> wrote: >> >> But secondly, you're already splitting the argument (or rather, taking >> it from your own parameters, already split), so you don't want to go >> through the shell. In fact, going through the shell would only make >> your life harder. Change that to shell=False and you'll see everything >> work. >> > > Changing shell value to False worked. I appreciate your help Chris, Thanks! Glad it's working! But please, don't just take my word for it and make a black-box change to your code. When you invoke subprocesses, be sure you understand what's going on, and when shell=True is appropriate and when shell=False is appropriate. The docs should be fairly clear on this. If you get this sort of thing wrong, you'll get weird errors like this (if you're lucky), or open yourself up to shell injection vulnerabilities (if you're not). ChrisA
Back to top | Article view | comp.lang.python
csiph-web