Suggest people use PYTHONPATH rather than adjusting sys.path internally.

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 ;).
This commit is contained in:
W. Trevor King 2012-03-13 09:30:45 -04:00
parent 55b6a03a50
commit db4fd99309
4 changed files with 5 additions and 3 deletions

View file

@ -17,7 +17,6 @@
#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

View file

@ -16,7 +16,6 @@
#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

View file

@ -24,7 +24,6 @@ import sys, os, string, struct, time, array
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

View file

@ -18,6 +18,11 @@
$ 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