command: Fix except declaration for get_comedi_cmd_pointer
[pycomedi.git] / README
1 This package provides an object-oriented interface to the Comedi_
2 drivers.  The standard Python interface bundled with Comedilib is a
3 simple SWIG clone of the C interface.  In pycomedi, we convert the
4 functions into class methods (see ``pycomedi.classes``), so you don't
5 have to worry about dragging around opaque types like ``comedi_t *``
6 device pointers.  We also bundle related constants together in
7 ``_Enums`` and ``_Flags`` (see ``pycomedi.constants``), to make
8 handling common operations like flag manipulations simpler.  Finally,
9 there are a number of utility classes (see ``pycomedi.utility``) to
10 make common tasks like creating instructions or reading hardware-timed
11 analog input easier.
12
13
14 Installation
15 ============
16
17 Packages
18 --------
19
20 Gentoo
21 ~~~~~~
22
23 I've packaged pycomedi for Gentoo.  You need layman_ and my `wtk
24 overlay`_.  Install with::
25
26     # emerge -av app-portage/layman
27     # layman --add wtk
28     # emerge -av dev-python/pycomedi
29
30
31 Dependencies
32 ------------
33
34 If you're installing by hand or packaging pycomedi for another
35 distribution, you'll need the following dependencies:
36
37 ============  ===================  ================  ==============================
38 Package       Purpose              Debian_           Gentoo_
39 ============  ===================  ================  ==============================
40 NumPy_        ?                    python-numpy      dev-python/numpy
41 SciPy_        testing              python-scipy      sci-libs/scipy
42 Comedi_       Comedilib interface  python-comedilib  sci-libs/comedilib [#wtk]_
43 nose_         testing              python-nose       dev-python/nose
44 Cython_       Comedilib interface  cython            dev-python/cython
45 python-kmod_  Optional ext. info.                    dev-python/python-kmod [#wtk]_
46 ============  ===================  ================  ==============================
47
48 .. [#wtk] In the `wtk overlay`_.
49
50 If python-kmod is installed, you will get additional module
51 information from the ``info.py`` demo program.  If it is not
52 installed, everything will still work, but ``info.py`` will only be
53 able to get the module version, not the kernel version, staging-ness,
54 parameters, etc.
55
56
57 Installing by hand
58 ------------------
59
60 Pycomedi is available as a Git_ repository::
61
62     $ git clone git://tremily.us/pycomedi.git
63
64
65 See the homepage_ for details.  To install the checkout, run the
66 standard::
67
68     $ python setup.py install
69
70
71 Usage
72 =====
73
74 See the examples in the ``doc`` directory.
75
76
77 Testing
78 =======
79
80 Run integration tests with::
81
82     $ nosetests --with-doctest --doctest-extension=txt doc
83
84 The analog integration tests read from analog input channels 0 through
85 3, and write to analog output channels 0 and 1, so you'll need a board
86 with that many channels.  You should also make sure that the analog
87 output channels aren't plugged into anything sensetive, since the
88 tests sweep their output around over a reasonable chunk of the channel
89 range.  Some of the internal unit tests also write, so it's safest to
90 just disconnect all digital lines and analog outputs before running
91 the tests.
92
93 Run both integration tests and internal unit tests with::
94
95     $ ./test.sh
96
97
98 Licence
99 =======
100
101 This project is distributed under the `GNU General Public License
102 Version 2`_ or greater.
103
104
105 Author
106 ======
107
108 W. Trevor King
109 wking@tremily.us
110
111
112 .. _Comedi: http://www.comedi.org/
113 .. _layman: http://layman.sourceforge.net/
114 .. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
115 .. _science overlay: http://overlays.gentoo.org/proj/science/wiki/en
116 .. _Debian: http://www.debian.org/
117 .. _Gentoo: http://www.gentoo.org/
118 .. _NumPy: http://numpy.scipy.org/
119 .. _SciPy: http://www.scipy.org/
120 .. _nose: http://somethingaboutorange.com/mrl/projects/nose/
121 .. _Cython: http://www.cython.org/
122 .. _python-kmod: https://github.com/agrover/python-kmod/
123 .. _Git: http://git-scm.com/
124 .. _homepage: http://blog.tremily.us/posts/pycomedi/
125 .. _GNU General Public License Version 2:
126      http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt