Python Call Parameters

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

The Python Adapter converts data between TestStand and Python when calling functions or using attributes in Python.

Note Note  Python has infinite precision for numeric data types. When converting the numeric types from Python to TestStand, there might be data loss due to overflow or underflow of a numeric value.
The table below contains the mapping of data types between TestStand and Python.

TestStand Python 2.7 Python 3.6+
Floating Point Number float float
Signed 64 Number long int
Unsigned 64 Number long int
Enum (Floating Point Representation) float float
Enum (Signed 64 Representation) long int
Enum (Unsigned 64 Representation) long int
Boolean bool bool
String str str
Container tuple tuple
Array list list

You can store the return value of a function or get attribute in an object reference as a PyObject. You can use the PyObject stored in the object reference as a parameter for a function or in a set attribute.

Note Note  A Python object created in a Python interpreter session should be used only in that session.

The type of array elements in Python's list depends on the type of array element in TestStand. For example, Array of Strings in TestStand will be mapped to list of str in Python.

When the parameter type is set to Dynamic, TestStand will use the type of the evaluated expression to determine how to pass the data to Python.

Note Note  Numeric constants will be passed to Python using the constant's default float type. 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().


Not Helpful