My first real request for help

Gene Heskett gheskett at wdtv.com
Tue Nov 19 22:39:52 CET 2013


On Tuesday 19 November 2013 16:03:23 Tim Chase did opine:

> On 2013-11-19 13:43, Gene Heskett wrote:
> > Interesting, a print cmd immediately in front of that is quite
> > noisy: ['./camview-emc-f1oat.py', '-v', '1280x720', '-C',
> > 'camview.cfg', '-g', 'cam.ui', '-H', 'campins.hal', '-w',
> > '150995278']
> 
> This suggests that the value of "cmd" is indeed a list of
> [program_name, arguments...] which is what it should be.  So the
> Popen(cmd) should be right.
> 
> The next thing to verify that the working directory contains the
> program that is being called, and that it's executable. So I'd add
> some debugging dump, something like
> 
>   print(repr(cmd))
>   ####### added stuff below #######
>   import os
>   print("Current directory: %s" % os.getcwd())
>   cmd_name = cmd[0]
>   if os.path.isfile(cmd_name):
>     print("%s exists and has a mode of %o" % (
>       cmd_name,
>       os.stat(cmd_name).st_mode,
>       ))
>   else:
>     print("%s isn't a file (missing or a directory?)" % cmd_name)
>   ####### added stuff above #######
>   child = Popen(cmd)
> 
> This should give you information on where the current working
> directory is, whether the "./camview-emc-float.py" is in that
> directory, and whether it is executable or not.
> 
> Just an observation here, it looks like you might have a "one"
> instead of an "ell" in "float" in the file-name.  Intentional?
> 
> -tkc

That is a possibility, I know I had some file not found errors that were 
only fixed by do an mv (copy/paste for ls listing camview-emc-float.py, in 
which case the miss-spelling is how its name on the web page I pulled it 
from.

Adding , shell=True to the Popen fixed it so it runs, but with unusual 
results.  It is SUPPOSED to make tab controlled overlay over the linuxcnc 
backplot window when that tab is selected.  The tab is there, but the 
window is blank because its opening a new window.  And the final halio 
stanza of the config isn't running, I presume because its also reporting:

** (camview-emc-float.py:3775): WARNING **: 
/usr/local/lib/camunits/halio.so: undefined symbol: gluOrtho2D

on the linuxcnc launch.

I do not have libgl installed because then the other camera didn't work, 
but am using the mesa-swx11 version so it would work.  So what I'll 
probably have to do is install libgl long enough to rebuild halio.so and 
install it.  I think its named wrong, it should be Duncan, like the yo-yo 
maker. :)

So I guess thats next, re-install libgl & -dev, rebuild halio.so, (no error 
yip about a missing GL/gl.h now, and then see if it works with this camera.  
But I have a bet with myself that it will look like its out of horizontal 
synch.  Actually it was a black screen, reinstall the lib gl-mesa-swx11 
stuff, the camera works again it its own window, and I still see the above 
undefined gluOrtho2D error.

Thanks a bunch Tim, but I think I'll see if the halio.c author can speak to 
this one.

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)

You're too beautiful to ignore.  Too much woman.
		-- Kirk to Yeoman Rand, "The Enemy Within", stardate 
unknown
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