Skip to main content

Library for interfacing with Intrepid devices in Python

Project description

Description

Python wrapper for interfacing to IntrepidCS Hardware.

Installing

  • pip install python_ics

Platform specific Installation notes

Windows

Linux

  • Linux builds use libicsneo and are built against manylinux using cibuildwheel.
  • libicsneolegacy.so is bundled with the wheel and python_ics will automatically use it.

MacOS

  • Mac builds use libicsneo and are built using cibuildwheel
  • libicsneolegacy.dylib is bundled with the wheel and python_ics will automatically use it.

Documentation

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

Building from source

  • Building from source requires clang and clang-format to be present on the build machine.
  • python_ics has submodules, please be sure to initial all submodules also.
PS > git clone git@github.com:intrepidcs/python_ics.git

PS > cd python_ics

PS > git submodule update --init

PS > clang --version
clang version 11.1.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin

PS > clang-format --version
clang-format version 11.1.0

PS > python -m pip install .

Debugging on Windows with Visual Studio Code

  • Build and install python_ics for debug. When installing python choose the following:
    • Customize Installation -> Advanced Options
      • Check Download debugging symbols
      • Check Download debug binaries
  • Build python with debug:
    • Install Visual Studio 2019 build tools(NOTE: As of 2/5/24, it looks like MSVC 2022 does not build correctly with setuptools and debug configurations). You should be able to build from source already.
    • Create virtual environment and activate it (powershell):
      • python -m venv .venv
      • .\.venv\Scripts\Activate.ps1
    • Install dependencies:
      • python -m pip install -r requirements.txt
    • Build in debug (-g flag):
      • python setup.py build -g
    • Install into our virtual environment:
      • python setup.py install --force
    • Inside visual studio code:
      • Open the root python_ics directory
        • code C:\Path\To\python_ics
      • Make sure the python extension is installed (ctrl+shift+x)
      • Select the python interpreter from our virtual environment (bottom right with a python file open in the editor).
      • Open and place a breakpoint in src/icsdebug.py
      • launch "Python: Debug icsdebug.py"
        • Note the PID that is outputted to terminal (Can also add os.getpid() to watch window)
      • Place a breakpoint inside the function you'd like to debug in methods.cpp
      • launch "Debugger Attach" (launch.json) and enter the pid when prompted.
      • enjoy!

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.

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 Distributions

python_ics-914.14.post1-cp312-cp312-win_amd64.whl (203.5 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

python_ics-914.14.post1-cp312-cp312-win32.whl (199.5 kB view hashes)

Uploaded CPython 3.12 Windows x86

python_ics-914.14.post1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

python_ics-914.14.post1-cp312-cp312-macosx_10_13_universal2.whl (1.8 MB view hashes)

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

python_ics-914.14.post1-cp311-cp311-win_amd64.whl (203.3 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

python_ics-914.14.post1-cp311-cp311-win32.whl (199.4 kB view hashes)

Uploaded CPython 3.11 Windows x86

python_ics-914.14.post1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

python_ics-914.14.post1-cp311-cp311-macosx_10_13_universal2.whl (1.8 MB view hashes)

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

python_ics-914.14.post1-cp310-cp310-win_amd64.whl (203.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

python_ics-914.14.post1-cp310-cp310-win32.whl (199.4 kB view hashes)

Uploaded CPython 3.10 Windows x86

python_ics-914.14.post1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

python_ics-914.14.post1-cp310-cp310-macosx_10_13_universal2.whl (1.8 MB view hashes)

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

python_ics-914.14.post1-cp39-cp39-win_amd64.whl (203.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

python_ics-914.14.post1-cp39-cp39-win32.whl (199.4 kB view hashes)

Uploaded CPython 3.9 Windows x86

python_ics-914.14.post1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

python_ics-914.14.post1-cp39-cp39-macosx_10_13_universal2.whl (1.8 MB view hashes)

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

python_ics-914.14.post1-cp38-cp38-win_amd64.whl (203.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

python_ics-914.14.post1-cp38-cp38-win32.whl (199.4 kB view hashes)

Uploaded CPython 3.8 Windows x86

python_ics-914.14.post1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

python_ics-914.14.post1-cp38-cp38-macosx_10_13_universal2.whl (1.8 MB view hashes)

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

python_ics-914.14.post1-cp37-cp37m-win_amd64.whl (203.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

python_ics-914.14.post1-cp37-cp37m-win32.whl (199.4 kB view hashes)

Uploaded CPython 3.7m Windows x86

python_ics-914.14.post1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

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