Skip to main content

Python wrapper for libinklevel

Project description

python-inklevel
===============

`|Build Status| <https://travis-ci.org/tom-mi/python-inklevel>`_

Python wrapper for `libinklevel <http://libinklevel.sourceforge.net/>`_.

Prerequisites
-------------

Install `libinklevel <http://libinklevel.sourceforge.net/>`_, e.g. on
Debian:

::

apt-get install libinklevel

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 <http://libinklevel.sourceforge.net/>`_ and
`ink <http://ink.sourceforge.net/>`_ for details.

License
-------

This software is licensed under GPLv2.

.. |Build
Status| image:: https://travis-ci.org/tom-mi/python-inklevel.svg?branch=master

Project details


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

inklevel-0.1.1-py2-none-any.whl (5.9 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page