The Python bindings for libtiepie-hw provide an easy to use interface to control the instruments.
Contents
Installation
Windows
To install the Python bindings for libtiepie-hw and examples on Windows:
- Install the Python bindings by executing pip install python-libtiepie
- Download the python-libtiepie examples.
- Unpack them using an extractor.
- Connect your USB oscilloscope.
- Run an example by executing e.g. python OscilloscopeBlock.py
Linux
To install the Python bindings for libtiepie-hw and examples on Linux:
- Ensure that libtiepie-hw is installed.
- Install the Python bindings by executing sudo pip install python-libtiepie
- Download the python-libtiepie examples.
- Unpack them using an extractor like e.g. unzip.
- Connect your USB oscilloscope.
- Run an example by executing e.g. python OscilloscopeBlock.py
Examples
List of available example scripts:
Trouble shooting
Upgrading from LibTiePie to libtiepie-hw
When the old LibTiePie SDK was already installed on the computer, installing libtiepie-hw using the command
pip install python-libtiepie
may not be successful and leave the old LibTiePie SDK installation intact.
In that case, use the command
pip install --upgrade python-libtiepie
to force pip to get the latest version of the libtiepie-hw SDK.
Import error
When you get an error like one of the following errors:
tiepie@tiepie-pc:~/TiePie> python3 OscilloscopeBlock.py Traceback (most recent call last): File "OscilloscopeBlock.py", line 11, inimport libtiepie ImportError: dynamic module does not define module export function (PyInit_libtiepie)
Python tries to load the LibTiePie SDK as Python module.
To avoid that, make sure libtiepie.so doesn't exist in the script's directory.