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


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

Re: subprocess check_output

Started byChris Angelico <rosuav@gmail.com>
First post2015-12-31 09:32 +1100
Last post2015-12-31 09:32 +1100
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 check_output Chris Angelico <rosuav@gmail.com> - 2015-12-31 09:32 +1100

#101015 — Re: subprocess check_output

FromChris Angelico <rosuav@gmail.com>
Date2015-12-31 09:32 +1100
SubjectRe: subprocess check_output
Message-ID<mailman.88.1451514771.11925.python-list@python.org>
On Thu, Dec 31, 2015 at 8:02 AM, Cameron Simpson <cs@zip.com.au> wrote:
> On 30Dec2015 21:14, Carlos Barera <carlos.barera@gmail.com> wrote:
>>
>> Trying to run a specific command (ibstat)  installed in /usr/sbin on an
>> Ubuntu 15.04 machine, using subprocess.check_output and getting "/bin/sh:
>> /usr/sbin/ibstat: No such file or directory"
>>
>> I tried the following:
>> - running the command providing full path
>> - running with executable=bash
>> - running with (['/bin/bash', '-c' , "/usr/sbin/ibstat"])
>>
>> Nothing worked ...
>
>
> The first check is to run the command from a shell. Does it work? Does
> "which ibstat" confirm that the command exist at that path? Is it even
> installed?

And do those checks as the same user as your script runs as, with the
same environment and all. You might find that a file is executable for
one user but not for another, or something.

ChrisA

[toc] | [standalone]


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


csiph-web