Python wrapper for libinklevel
Project description
Python wrapper for libinklevel.
Prerequisites
Install libinklevel, e.g. on Debian:
apt-get install libinklevel
Installation
pip install inklevel
Usage
import inklevel # libinklevel version print(inklevel.get_version_string()) # Get data from /dev/usb/lp0: data = inklevel.get_usb_ink_level(0) for cartridge, value in data.levels: print('{}: {}'.format(cartridge.description, value)) # Get data from /dev/parport2 data = inklevel.get_parport_ink_level(2)
The functions get_usb_ink_level and get_parport_ink_level are convenience functions using the original libinklevel interface. You can also use that:
data = inklevel.get_ink_level(inklevel.Port.USB, None, 0) data = inklevel.get_ink_level(inklevel.Port.CUSTOM_USB, '/dev/usb/lp0', None)
See libinklevel and ink for details.
License
This software is licensed under GPLv2.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file inklevel-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: inklevel-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e270b78eb2b6484054f437f5c22e483b2050e7dcdb6a72a0edb4b11af4193c5 |
|
MD5 | 6d27be355fc3d78397e5037a5ae7ea06 |
|
BLAKE2b-256 | d6c412cc2e3740de7fd2faeaf67f66c686e45a143bdbca0aa632f496b182f45a |