Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101015 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2015-12-31 09:32 +1100 |
| Last post | 2015-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.
Re: subprocess check_output Chris Angelico <rosuav@gmail.com> - 2015-12-31 09:32 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-12-31 09:32 +1100 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web