The API is included when installing Labber, and the files are located in the “Script” folder of the main program directory. To access the API, add the “Script” folder to your Python path.
The Labber API requires the following Python packages:
- Python 2.7, or Python 3.4 or later
- PyQt4 or PyQt5
1.2. Testing the API¶
To test the Labber API installation, execute the following code in a Python console:
import Labber print (Labber.version)
1.3. Upgrading from earlier versions¶
Note that in Labber version 1.1 and later, the ScriptTools module has been moved into the
Labber module. To make scripts written for older versions of Labber work with version 1.1 and later, replace
import ScriptTools with
from Labber import ScriptTools.