Wrapping C-functions to Python

Pyhton is used for data taking and analysis. However, there are only c-functions available to talk to VME and GPIB instruments or modules. The SWIG tool is used to wrap some of these functions to Python so that they can be called directly from Python.

SWIG generates a shared library (e.g.: gpibmodule.so) that can be imported into python (import gpib). This library has to be in the python path, set by the PYTHONPATH environment variable, or it should be in the default directory for additional packages, site-packages (e.g.: /usr/local/lib/python2.1/site-packages/ ).

Links


Last modified: Wed Feb 20 14:26:24 PST 2002