Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77388 > unrolled thread

Re: subprocess module usage

Started byChris Angelico <rosuav@gmail.com>
First post2014-09-01 13:55 +1000
Last post2014-09-01 13:55 +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.


Contents

  Re: subprocess module usage Chris Angelico <rosuav@gmail.com> - 2014-09-01 13:55 +1000

#77388 — Re: subprocess module usage

FromChris Angelico <rosuav@gmail.com>
Date2014-09-01 13:55 +1000
SubjectRe: subprocess module usage
Message-ID<mailman.13678.1409543719.18130.python-list@python.org>
On Mon, Sep 1, 2014 at 1:28 PM, Earl Lapus <earl.lapus@gmail.com> wrote:
> So, what could be causing this behavior? Is this expected or is there
> something wrong with how I'm using the subprocess module?

The latter. Your problem is with your shell= option.

Firstly, the parameter should be either shell=True or shell=False, not
shell="True". However, I don't believe that's making any difference
here (although shell="False" would act as shell=True, and confuse you
greatly).

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.

Meta-comment: Rather than attaching your code, please just include it
in-line. It's much easier to work with - especially when I want to
quote a line and respond to it. Thanks!

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web