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:
parent
55b6a03a50
commit
db4fd99309
4 changed files with 5 additions and 3 deletions
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
#set the paths so python can find the comedi module
|
#set the paths so python can find the comedi module
|
||||||
import sys, os, string, struct, time
|
import sys, os, string, struct, time
|
||||||
sys.path.append('./build/lib.linux-i586-2.1')
|
|
||||||
|
|
||||||
import comedi as c
|
import comedi as c
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#set the paths so python can find the comedi module
|
#set the paths so python can find the comedi module
|
||||||
import sys, os, string
|
import sys, os, string
|
||||||
sys.path.append('./build/lib.linux-i586-2.1')
|
|
||||||
|
|
||||||
import comedi as c
|
import comedi as c
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import sys, os, string, struct, time, array
|
||||||
sys.path.append(sys.path.pop(0))
|
sys.path.append(sys.path.pop(0))
|
||||||
import mmap
|
import mmap
|
||||||
|
|
||||||
sys.path.append('./build/lib.linux-i586-2.1')
|
|
||||||
import comedi as c
|
import comedi as c
|
||||||
|
|
||||||
#open a comedi device
|
#open a comedi device
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
$ python setup.py build
|
$ python setup.py build
|
||||||
$ python setup.py install
|
$ 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
|
2) Using the module
|
||||||
All the comedilib functions are translated directly to python
|
All the comedilib functions are translated directly to python
|
||||||
function. The various comedi structs are now available as python
|
function. The various comedi structs are now available as python
|
||||||
|
|
Loading…
Add table
Reference in a new issue