Python Script package
The Python Script package contains actions that enable Python Script functions in a task.
Before you start
- The appropriate version of Python is installed on the device
on which you want to execute the script.Note: Python versions 2.x and 3.x are supported.
- The "PATH" environment variable is updated to the path of the Python folder.
To verify if the Python environment variable is set correctly, enter Python in the command prompt. If it returns the Python version that is installed, the path environment is set up correctly.
Perform the following actions within the Python Script package as part of using the set of available actions:
- Open a Python Script file, or manually enter the script you want to run using the Open action. You must associate the details of the file or script you want to run with a session name.
- Run the script using the Execute function or the
- If you uploaded a file containing the script, use the Execute script action.
- If you manually input the script, use the Execute function action.
- Close the Python Script session after running the script.
To review the bot launcher logs, navigate to C:\ProgramData\AutomationAnywhere\BotRunner\Logs\<current month>\Bot_Launcher-<today's date>.log.zip. Each zipped folder contains a file with data on the code execution, which is useful for debugging.
Actions in the Python Script package
|Close||Closes the session.
Specify the same session name from the Open action.
Important: It is mandatory to close the session after the script is executed.
|Execute function||Executes a function within the Python Script.
|Execute script||Executes a script within the Python Script.
|Open||Opens a Python Script file.
- Free A2019 bots that use Python from Bot Store
- Developer content on automating with Python: Automate with Python integration
- Training course: Did You Know that You can Write Inline Scripts Inside a
Bot? from Automation Anywhere University: RPA Training and Certification (A-People login required)
This course introduces you to writing inline scripts within a command.