Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:help': 0.08; '__init__': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '.py': 0.16; '2.6.4': 0.16; 'cmd': 0.16; 'command,': 0.16; 'errread,': 0.16; 'errwrite)': 0.16; 'inserting': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'time"': 0.16; 'alpha': 0.16; 'wrote:': 0.18; 'bit': 0.19; '(but': 0.19; 'subject:request': 0.19; 'written': 0.21; '>>>': 0.22; 'import': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'config': 0.24; 'skip:" 30': 0.26; 'switch': 0.26; 'skip:_ 20': 0.27; 'header:X -Complaints-To:1': 0.27; 'on,': 0.29; 'raise': 0.29; "doesn't": 0.30; 'code': 0.31; '"",': 0.31; 'option.': 0.31; 'sep': 0.31; 'work:': 0.31; 'file': 0.32; 'run': 0.32; 'running': 0.33; '(most': 0.33; 'skip:_ 10': 0.34; 'but': 0.35; 'version': 0.36; 'ubuntu': 0.36; 'should': 0.36; 'so,': 0.37; 'too': 0.37; 'starting': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'new': 0.61; 'such': 0.63; 'more': 0.64; 'believe,': 0.84; 'missing.': 0.84; 'plugins': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: My first real request for help Date: Tue, 19 Nov 2013 11:16:41 +0100 Organization: None References: <201311190431.15449.gheskett@wdtv.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p508487f6.dip0.t-ipconnect.de User-Agent: KNode/4.7.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 69 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384856198 news.xs4all.nl 15882 [2001:888:2000:d::a6]:33473 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59974 Gene Heskett wrote: > Old python, 2.6.4 I believe, not update able from the Ubuntu 10.04.3 LTS > repo's. > > Should be a mauchs nichs as the code was written on, and is running on, > several of these same linuxcnc installs. > > But when I switch in, as one of the plugins a new .py version of camview- > emc, I get this when I attempt to run linuxcnc -l, where the -l is "use > the same config as last time" option. > > Starting LinuxCNC... > Traceback (most recent call last): > File "/usr/bin/axis", line 3326, in > _dynamic_tabs(inifile) > File "/usr/bin/axis", line 3182, in _dynamic_tabs > child = Popen(cmd) > File "/usr/lib/python2.6/subprocess.py", line 633, in __init__ > errread, errwrite) > File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > > No clue, even when straced, as to what file might be missing. > > So, how do I find out? How about inserting a print cmd before the line child = Popen(cmd) ? Depending on its value it may not even be a missing command, e. g. This doesn't work: Python 2.6.7 (r267:88850, Sep 28 2012, 16:26:39) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.Popen("ls -1") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/subprocess.py", line 623, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory But this works: >>> subprocess.Popen(["ls", "-1"]) >>> alpha beta gamma And this works, too (but is a bit less robust): subprocess.Popen("ls -1", shell=True) >>> alpha beta gamma