RPA | A2019 Python Package| Automation Anywhere - Part-32
A2019 Python Package - Today in this article we will discuss about how to use Python package using A2019 Automation Anywhere.
A2019 Python script package contains actions which enables us to perform python related scripts and functions in a task. To use the Python script action we need to install the python package by going to Bots->My bots and then search for the python action and click on install.
Note :- To use Python script we must have the python executables or any of the python software i.e. in Anaconda we can use spyder software to write the python scripts.
A2019 Python action provides various actions that we can use such as open a python script, execute python script, execute python functions and close the python session using the close action. We will be discussing each of these actions mentioned in detail.
- Open Action - The open command of python action let us to open the session and we can use the session further in our code so that we can execute other actions that python provides. In the properties section we need to pass the session name. We can give any session name as per our convenience. Next we can either import the python script that we have written or we can pass in the manual input and lastly we need to select the version of the python that we are using i.e. either version 2 or version 3. Also we must keep one thing while importing is that we can import only those python files having ".py" as extension.
- Execute Script Action - This action is used to execute the python script. In the properties section we need to give the session name that we defined in the Open action and then if there is a need to store the output then we can store the output by creating a string variable data type.
- Execute Function Action - This command is used to execute a python function. The function that we need to write can be written either in the notepad or we can write the function in the anaconda where we have various options such as spyder, jupyter notebook etc. Coming back to A2019 Automation Anywhere in the properties section of this command we need to pass in the session name which we defined in the open action, then we need to give the function name that we need to execute and then give the parameters if we have any defined in the function and store the output in a string variable data type.
- Close Action - This command or action is used to close the python session that we opened in the Open action. The name of the session must be same as that used in the open action.
Comments
Post a Comment
If you have any doubts, please letme know.