Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101015
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: subprocess check_output |
| Date | Thu, 31 Dec 2015 09:32:48 +1100 |
| Lines | 24 |
| Message-ID | <mailman.88.1451514771.11925.python-list@python.org> (permalink) |
| References | <CAJYwLU=p_U3V7MfOx3wCH8qkamK0aSHzF1i0g2ZBgTXDgrF03Q@mail.gmail.com> <20151230210227.GA88234@cskk.homeip.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de xVSyRWA3+AWkCuAmuYXKjgbNY7v7HDiBixbqB6pqhXhw== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'executable': 0.07; 'skip:/ 10': 0.07; 'thu,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:209.85.213.176': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'simpson': 0.16; 'something.': 0.16; 'wrote:': 0.16; 'runs': 0.18; '2015': 0.20; 'to:name:python-list@python.org': 0.20; '31,': 0.22; 'trying': 0.22; 'am,': 0.23; 'dec': 0.23; 'tried': 0.24; 'header:In-Reply- To:1': 0.24; 'all.': 0.24; 'script': 0.25; 'command': 0.26; 'installed': 0.26; 'skip:" 20': 0.26; 'message- id:@mail.gmail.com': 0.27; 'environment': 0.29; 'checks': 0.30; 'getting': 0.33; 'run': 0.33; 'ubuntu': 0.33; 'file': 0.34; 'worked': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'exist': 0.35; 'path': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'confirm': 0.62; 'providing': 0.62; 'cameron': 0.66; 'chrisa': 0.84; 'carlos': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jZ5TkAxc1Uqkbud91j6ldrgp4eRoMoKyKDW+enheVVs=; b=eM1Aj4tfUZwl5OyxY906fN71rkZngu6guSZy7go5P5J38O3jjCeZpukmWvTERm5MsL eTeLZTYpAi/S3xImf+IM43cXlDUAet3j10a/OgiiDby0WH1Z75fL+rHNSNo/BhO+LdCJ XJVjCOzVtR8U317tuFsXD1FwIrLoM2oCeypqhEL9bcEFyNyuLXTeLzKvDxGNV1Sh2B4G sE2JTyw5MukIneOVNRXI055B4+ZHJHto2SzylXceo5gNRpO0uZNEZDDqmvHIm969JE4/ 1my7uxYJ6YWeaz5cz4SI7g3MsnDBJGdO9XSTGuiZcvMeKZN9m0FixAdtkYWDEHly8H5x hHuw== |
| X-Received | by 10.50.60.6 with SMTP id d6mr11111706igr.94.1451514769208; Wed, 30 Dec 2015 14:32:49 -0800 (PST) |
| In-Reply-To | <20151230210227.GA88234@cskk.homeip.net> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:101015 |
Show key headers only | View raw
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: subprocess check_output Chris Angelico <rosuav@gmail.com> - 2015-12-31 09:32 +1100
csiph-web