Module Tab - Edit Python Call Dialog Box
- Aktualisiert2025-07-21
- 2 Minute(n) Lesezeit
Module Tab - Edit Python Call Dialog Box
Python Module Tab
To display the Python Module tab in the TestStand Sequence Editor, insert a step configured to use the Python Adapter and select Specify Module or Step Settings from the context menu. To display the Python Module tab in the TestStand User Interfaces, insert a step configured to use the Python Adapter and select Specify Module from the context menu.
Note
Install the Jedi package to view additional options you can select for a module, such as inner classes, function and attribute names defined in a base class, and imported classes, attributes, and functions.
The Python Module tab contains the following options:
-
Module
—Relative or absolute path of the Python module to execute. The Python module can be a
.py
file or a directory which contains a
__init__.py
file.
Note When you specify a relative path, the Python Adapter will determine the absolute path using the following search directories in order:
- TestStand search directories.
- If a virtual environment is specified, Python search directories specific to the virtual environment.
- Python search directories specific to the main installation of the configured Python version.
- Browse for Module —Launches a Browse dialog box in which you can specify a path for the Python code module.
- View —Opens the configured Python module in application configured in Python Adapter configuration dialog box.
- Advanced Settings —Launches the advanced settings dialog to specify the Python interpreter session to use for executing specified code module.
- Reload Python Module —Performs reload of the configured Python module and updates the parameter list for the specified Python function.
- Namespace —Displays the namespace of the selected module. To learn how TestStand determines the namespace, refer to Python Namespaces .
-
Operation Scope
—Specifies scope of the operation to be performed. It contains the following values:
- Module
- Class
- Class Instance
-
Operation Type
—Specifies operation to perform. It contains the following values:
- Create Class Instance
- Call Method
- Get Attribute
- Set Attribute
- Class Name —Name of the Python class existing in the specified module to be used during execution.
- Class Instance —Location of object reference variable holding an instance of the Python class.
- Function or Attribute Name —Name of the Python attribute or function existing in the specified module to be used during execution.
-
Parameters Table
—Contains the parameters and return values for the configured operation in the step. The Parameters Table contains the following columns:
- Parameter Name
- Parameter Type —Python type of the parameter.
-
Log
—Option that enables step to log the parameter as an additional result.
Note Enabling this option is equivalent to using the checkbox next to the additional result name on the Additional Results panel of the Properties tab of the Step Settings pane.
-
Value
—TestStand expression.
Note For input parameters, TestStand passes the value of this expression. For output parameters, TestStand stores the data the method returns in the location this expression specifies.
- Parameter Add Button —Adds a new parameter to the end of the parameter list.
- Parameter Remove Button —Removes the selected parameter.
- Parameter Move Up Button —Swap the position of current selected parameter and parameter above it.
- Parameter Move Down Button —Swap the position of current selected parameter and parameter below it.