Python Call Parameters
- Updated2026-02-03
- 2 minute(s) read
Python Call Parameters
The Python Adapter converts data between TestStand and Python when calling functions or using attributes in Python. The table below contains the mapping of data types between TestStand and Python.
| TestStand | Python 2.7 | Python 3.6+ | Notes |
|---|---|---|---|
| Floating Point Number | float | float |
Python has infinite precision for numeric data types. When converting the numeric types from Python to TestStand, data loss may occur due to overflow or underflow of a numeric value. TestStand passes numeric constants to Python using the default float type for the constant. If you want to pass numeric constants to Python as integers, change the numeric representation of constants by using the expression function Int64() or UInt64() . |
| Signed 64 Number | long | int | |
| Unsigned 64 Number | long | int | |
| Enum (Floating Point Representation) | float | enum | TestStand passes enums to Python modules as Python enums only if you specify a type mapping for the TestStand enum. Otherwise, TestStand passes enums to Python modules as numbers. |
| Enum (Signed 64 Representation) | long | enum | |
| Enum (Unsigned 64 Representation) | long | enum | |
| Boolean | bool | bool | — |
| String | str | str | — |
| Container | tuple | tuple | — |
| Array (Excluding Array of Numbers) | list | list | The type of array elements in a Python list depends on the type of array elements in TestStand. For example, Array of Strings in TestStand maps to a list of strings in Python. |
| Array of Numbers | list or NumPy array | list or NumPy array |
You must install the NumPy module to pass an array of numbers from TestStand to Python as a NumPy array. TestStand passes an array of numbers to a Python module as a list or NumPy array. You can define the behavior of passing Array of Numbers to Python in any of the following ways:
|
When you set the parameter type to Dynamic, TestStand uses the type of the evaluated expression to determine how to pass the data to Python.