Skip to main content

Python binding for libinco_32

Project description

inco_32 Python Binding

This is a Python 2 and 3 binding for libinco_32 (inco_32.dll/libinco_32.so), the library used for INCO communication to Indel industrial automation systems.

To use it, you need to have Indel Tools installed, which provides the library.

Usage

The Python API is for the most part a direct translation of the C API, with the exception that errors are reported using exceptions rather than return values, and output is provided as return values rather than through pointer arguments. Therefore, refer to the C API documentation for details.

Example

import inco_32
target = 'MyTarget'
try:
    cpuname = inco_32.GetVariable(target, 'Target.Cpu', 256)
except inco_32.INCOError as e:
    if e.m_uError == inco_32.ER_INCO_VAR_NOT_FOUND:
        print('where?')

For more usage examples, see the tests in tests/test_inco_32.py.

Installation

The binding is already installed in the Python installations included with Indel Tools (Indel Tools Setup on Windows, package python-inco32 on Linux). These installations are intended for internal use by Indel Tools.

For larger customer applications that require more packages to be installed, it is recommended that you use your own Python installation. For those, the package is available from PyPI:

pip install inco_32

To build from source, pip install build and use

rm -rf build src/inco_32.egg-info && python3 -m build .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inco_32-4.4.0.tar.gz (20.9 kB view hashes)

Uploaded Source

Built Distribution

inco_32-4.4.0-py2.py3-none-any.whl (19.9 kB view hashes)

Uploaded Python 2 Python 3

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