The old method only worked out of the box if you were running Python
2.1 on a 586. I imagine that is too small a slice of current users to
be worth hard coding ;).
#set the paths so python can find the comedi module
import sys, os, string, struct, time
-sys.path.append('./build/lib.linux-i586-2.1')
import comedi as c
#set the paths so python can find the comedi module
import sys, os, string
-sys.path.append('./build/lib.linux-i586-2.1')
import comedi as c
sys.path.append(sys.path.pop(0))
import mmap
-sys.path.append('./build/lib.linux-i586-2.1')
import comedi as c
#open a comedi device
$ python setup.py build
$ python setup.py install
+ If you want to test the wrappers before installing them, you will
+ need to set the `PYTHONPATH` environment variable so Python can find
+ the compiled modules. On my system, that looks like
+ $ PYTHONPATH=build/lib.linux-i686-2.7/ ../../demo/python/info.py
+
2) Using the module
All the comedilib functions are translated directly to python
function. The various comedi structs are now available as python