The gclib Python wrapper assumes the default gclib installation location.
>cd %temp% >mkdir py >cd py >copy "c:\Program Files (x86)\Galil\gclib\source\wrappers\python\*" . c:\Program Files (x86)\Galil\gclib\source\wrappers\python\gclib.py c:\Program Files (x86)\Galil\gclib\source\wrappers\python\setup.py 2 file(s) copied. >copy "c:\Program Files (x86)\Galil\gclib\examples\python\*" . c:\Program Files (x86)\Galil\gclib\examples\python\example.py 1 file(s) copied. >python setup.py install running install running build running build_py creating build creating build\lib copying gclib.py -> build\lib running install_lib running install_egg_info Removing C:\Users\user\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\gclib-1.0-py3.7.egg-info Writing C:\Users\user\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\gclib-1.0-py3.7.egg-info
$ mkdir py $ cd py $ cp /usr/share/gclib/src/wrappers/python/* . $ cp /usr/share/gclib/doc/examples/python/* . $ sudo python setup.py install [sudo] password for user: running install running build running build_py creating build creating build/lib copying gclib.py -> build/lib running install_lib copying build/lib/gclib.py -> /usr/lib/python2.7/site-packages byte-compiling /usr/lib/python2.7/site-packages/gclib.py to gclib.pyc running install_egg_info Writing /usr/lib/python2.7/site-packages/gclib-1.0-py2.7.egg-info
$ mkdir ~/python_temp $ cd ~/python_temp/ $ tar -xvf /Applications/gclib/source/gclib_python.tar.gz x gclib.py x setup.py $ tar -xvf /Applications/gclib/examples/gclib_python_examples.tar.gz x example.py $ sudo python setup.py install running install running build running build_py creating build creating build/lib copying gclib.py -> build/lib running install_lib copying build/lib/gclib.py -> /Library/Python/2.7/site-packages byte-compiling /Library/Python/2.7/site-packages/gclib.py to gclib.pyc running install_egg_info Writing /Library/Python/2.7/site-packages/gclib-1.0-py2.7.egg-info
>>> import gclib >>> g = gclib.py() >>> g.GOpen('192.168.0.42') >>> print(g.GInfo()) 192.168.0.42, DMC4080 Rev 1.2c, 783
$ python example.py gclib version: py.127.110.250 192.168.0.42, DMC4080 Rev 1.2c, 783
$ python example.py gclib version: py.127.110.250 192.168.0.42, DMC4080 Rev 1.2c, 783 GProgramDownload() correctly errored. Can't fit with level 3 compression Uploaded program: #A;i=0;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1 i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;EN Downloaded program verified Array element verified 187942.0000 Starting move... done.
>>> help(g.GOpen) Help on method GOpen in module gclib: GOpen(address) method of gclib.py instance Opens a connection a galil controller. See the gclib docs for address string formatting. >>> help(g.GCommand) Help on method GCommand in module gclib: GCommand(command) method of gclib.py instance Performs a command-and-response transaction on the connection. Trims the response. >>> 'for a full listing, try help(g)'