comedilib/demo/python
W. Trevor King 8add63faa3 Adjust sys.path before importing mmap in demo/python/mmap.py.
With the previous implementation, `mmap` was importing the demo
script, not the standard `mmap` library module.  From the docs [1]:

  The directory containing the script being run is placed at the
  beginning of the search path, ahead of the standard library
  path. This means that scripts in that directory will be loaded
  instead of modules of the same name in the library directory.

I'm not sure when this changed in Python, since the demo script
presumably worked with an earlier version.

[1]: http://docs.python.org/tutorial/modules.html#the-module-search-path
2012-03-13 09:12:41 -04:00
..
cmd.py Cast the period to an integer in demo/python/cmd.py's command setup. 2012-03-13 08:58:19 -04:00
info.py Add serial and PWM subdevice types to demo/python/info.py. 2012-03-13 08:55:08 -04:00
insn.py Add demo/python/insn.py, a Python clone of demo/insn.c. 2012-03-13 08:36:39 -04:00
mmap.py Adjust sys.path before importing mmap in demo/python/mmap.py. 2012-03-13 09:12:41 -04:00
README Add python examples from Luc Lefebvre <luc.lefebvre@mcgill.ca> 2003-06-04 02:53:45 +00:00

I wrote the python scripts using Bryan Cole's comedi wrappers.  I
followed the instructions provided by him to generate the comedi
python module.

I then produced the three following scripts:

info.py:

	This script emulates the comedilib/demo/info program

cmd.py:

	This script emulates the comedilib/demo/cmd program

mmap.py:

	This script emulates the comedilib/demo/mmap program with the
	added twist that the output is saved to a binary log file.
	This file can be accessed using a variety of means including a
	sample octave script <stream_readme3.m> which is provided.

As usual, comments are always welcome.

Luc Lefebvre <luc.lefebvre@mcgill.ca>
McGill University

29 May, 2003