Open
- Dernière mise à jour2026/04/22
The Open action in Python Script for API Task package opens a session for executing the Python scripts.
Overview
The Open action creates a new Python session that subsequent Python actions can reference by session name. You can define the source Python script by importing an existing file or entering code directly in the text field.
Settings
The following settings are available in the Open action:
- Python
- The source for the Python session. You can either select a
Python script file or enter the code directly.
- Import existing file: Select a Python script file as the data source. This option is currently not supported. Use the Manual input option.
- Manual input: Enter Python code directly in the Enter script here field.
- New Python session
- The session name identifies the current Python session. Use this name in
subsequent Python actions to execute the source script. The
action assigns
Defaultas the pre-configured session name. You can choose one of the following options to define the session name:- Local session: Select to create a session name that can only be used in the current API Tasks.
- Global session: Select this option to define a global session name that enables you to share the Python session across multiple API Tasks.
- Variable: Select or create a session variable to define the session name.