Skip to main content

This package provides an object-oriented interface to the Comedi drivers. The standard Python interface bundled with Comedilib is a simple SWIG clone of the C interface. In pycomedi, we convert the functions into class methods (see pycomedi.classes), so you don’t have to worry about dragging around opaque types like comedi_t * device pointers. We also bundle related constants together in _Enums and _Flags (see pycomedi.constants), to make handling common operations like flag manipulations simpler. Finally, there are a number of utility classes (see pycomedi.utility) to make common tasks like creating instructions or reading hardware-timed analog input easier.

Installation

Packages

Gentoo

I’ve packaged pycomedi for Gentoo. You need layman and my wtk overlay. Install with:

# emerge -av app-portage/layman
# layman --add wtk
# emerge -av dev-python/pycomedi

Dependencies

If you’re installing by hand or packaging pycomedi for another distribution, you’ll need the following dependencies:

Package

Purpose

Debian

Gentoo

NumPy

?

python-numpy

dev-python/numpy

SciPy

testing

python-scipy

sci-libs/scipy

Comedi

Comedilib interface

python-comedilib

sci-libs/comedilib [1]

nose

testing

python-nose

dev-python/nose

Cython

Comedilib interface

cython

dev-python/cython

python-kmod

Optional ext. info.

dev-python/python-kmod [1]

If python-kmod is installed, you will get additional module information from the info.py demo program. If it is not installed, everything will still work, but info.py will only be able to get the module version, not the kernel version, staging-ness, parameters, etc.

Installing by hand

Pycomedi is available as a Git repository:

$ git clone git://tremily.us/pycomedi.git

See the homepage for details. To install the checkout, run the standard:

$ python setup.py install

Usage

See the examples in the doc directory.

Testing

Run integration tests with:

$ nosetests --with-doctest --doctest-extension=txt doc

The analog integration tests read from analog input channels 0 through 3, and write to analog output channels 0 and 1, so you’ll need a board with that many channels. You should also make sure that the analog output channels aren’t plugged into anything sensetive, since the tests sweep their output around over a reasonable chunk of the channel range. Some of the internal unit tests also write, so it’s safest to just disconnect all digital lines and analog outputs before running the tests.

Run both integration tests and internal unit tests with:

$ ./test.sh

Licence

This project is distributed under the GNU General Public License Version 2 or greater.

Author

W. Trevor King wking@tremily.us

Metadata

Release files for pycomedi 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycomedi 0.9
File Size Uploaded Provenance
pycomedi-0.9.tar.gz 57.9 kB Without provenance Details

Release files / pycomedi-0.9.tar.gz

Download URL pycomedi-0.9.tar.gz
Size 57.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b552404e57e9c622d657dbe684382d541f194f0d821b588a33f613e6d4ae1f6e
BLAKE2b-256 checksum
How to use checksums
78ed1d57726ed120c4b27f99315a19123ebde3571e92c18b178d3ad2075a2bdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pycomedi 0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9 This release

1 release file No provenance

0.4

0.3

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page