My first real request for help
Gene Heskett
gheskett at wdtv.com
Tue Nov 19 11:19:26 EST 2013
On Tuesday 19 November 2013 11:16:10 Peter Otten did opine:
> 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 <module>
> >
> > _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 "<stdin>", line 1, in <module>
> 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"])
>
> <subprocess.Popen object at 0x7f8b31c5cfd0>
>
> >>> alpha
>
> beta
> gamma
>
> And this works, too (but is a bit less robust):
>
> subprocess.Popen("ls -1", shell=True)
> <subprocess.Popen object at 0x7f8b31c5cd90>
>
> >>> alpha
>
> beta
> gamma
You are suggesting I edit /usr/lib/python2.6/subprocess.py?
Thanks.
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
I have great faith in fools -- self confidence my friends call it.
-- Edgar Allan Poe
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
More information about the Python-list
mailing list