Skip to main content

Library for interfacing with Intrepid devices in Python

Project description

# python_ics

Python C Code module for interfacing to the icsneo40 dynamic library. Code tries to respect PEP 8 (https://www.python.org/dev/peps/pep-0008/). Function naming convention does not follow the tradition c style icsneo40 naming convention as the python_ics module name acts as the namespace (icsneo portion of the function) and function names are suppose to be lowercase with underscores instead of mixedCase like icsneo API.

# Installing

  • pip install python_ics

  • Placing icsneo40.dll in the system path as the api uses this DLL extensively.

# How to use

#### Documentation

http://python-ics.readthedocs.io/

#### C API can be mimiced almost identically by doing the following:

>>> import ics as icsneo
>>> devices = icsneo.FindNeoDevices()
>>> for device in devices:
...     print(device.Name, device.SerialNumber)
...
neoVI FIRE 59886

#### Recommended Python way by doing the following:

>>> import ics
>>> devices = ics.find_devices()
>>> for device in devices:
...     print(device.Name, device.SerialNumber)
...
neoVI FIRE 59886

It should be noted that ics.NeoDevice is used a little bit differently than the C API. ics.NeoDevice contains two extra members:

ics.NeoDevice.AutoHandleClose and ics.NeoDevice._Handle The handle normally returned from icsneoOpenNeoDevice() is stored inside _Handle and setting AutoHandleClose to True (Default) will automatically close the handle when the ics.NeoDevice goes out of scope.

# License - MIT

Copyright (c) Intrepid Control Systems, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

python_ics-909.8.tar.gz (110.1 kB view hashes)

Uploaded Source

Built Distributions

python_ics-909.8-cp310-cp310-win_amd64.whl (179.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

python_ics-909.8-cp310-cp310-win32.whl (171.1 kB view hashes)

Uploaded CPython 3.10 Windows x86

python_ics-909.8-cp310-cp310-macosx_10_13_universal2.whl (1.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.13+ universal2 (ARM64, x86-64)

python_ics-909.8-cp39-cp39-win_amd64.whl (179.2 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

python_ics-909.8-cp39-cp39-win32.whl (171.1 kB view hashes)

Uploaded CPython 3.9 Windows x86

python_ics-909.8-cp39-cp39-macosx_10_13_universal2.whl (1.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.13+ universal2 (ARM64, x86-64)

python_ics-909.8-cp38-cp38-win_amd64.whl (179.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

python_ics-909.8-cp38-cp38-win32.whl (171.6 kB view hashes)

Uploaded CPython 3.8 Windows x86

python_ics-909.8-cp38-cp38-macosx_11_0_universal2.whl (1.1 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64)

python_ics-909.8-cp37-cp37m-win_amd64.whl (179.3 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

python_ics-909.8-cp37-cp37m-win32.whl (171.2 kB view hashes)

Uploaded CPython 3.7m Windows x86

python_ics-909.8-cp37-cp37m-macosx_10_13_x86_64.whl (961.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.13+ x86-64

python_ics-909.8-cp36-cp36m-win_amd64.whl (179.3 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

python_ics-909.8-cp36-cp36m-win32.whl (171.2 kB view hashes)

Uploaded CPython 3.6m Windows x86

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