Run Python code on A2019 Community Edition

A feature of A2019 is that you can call Python or VBScript or write inline. There is something like that. This time, various easy-to-use libraries such as data analysis, machine learning, image analysis, etc. are prepared. Here's how to run Python from A2019.

The Python code itself is very simple this time, displaying arbitrary messages in a message box. However, if it works, please try various things.

Things to prepare

PC with Automation Anywhere A2019 Community Edition set up

Rough flow

I've written a lot of things in a mess, but to put it simply, this is all I have to do.

Setting

Set up Python Set on the Windows side (pass Path to Python.exe) A2019 Make a bot Execute

Procedure (setting)

1. Download Python from the Download section of the official Python page.

Either ver2 series or 3 series is okay. (I dropped ver 3.8.)

Welcome to Python.org https://www.python.org/

2. Install Python.

All you have to do is start the executable file and follow the instructions.

3. Settings to enable Python to be called in A2019.

Set so that Python can be started just by typing "Python" at the command prompt.

I. Open the control panel. (Opens in one shot with Win + Pause Break)

II. Click "Advanced system settings" in the menu on the left.

III. Open the "Detailed Settings" tab.

IV. Click "Environment Variables".

V. Setting environment variables-1

There are similar lists on the top and bottom, but if you apply only to the currently logged in user, the top, If you want to apply it to all users registered on the PC, find the item "Path" in the list below and open it.

VI. Setting environment variables-2

The environment variable "Path" setting dialog opens. Click "New" in the menu on the right. Enter the path of the folder where Python.exe is installed. In my environment, it was installed in the following path. C: \ Users \ username \ AppData \ Local \ Programs \ Python \ Python38-32

4. Make sure Python.exe is in your path

Open a command prompt. (The quick way is to type Win + r-> cmd and enter.) When the command prompt opens, type "Python" and press Enter. If the following display is displayed, it is successful. image.png

Procedure (A2019)

When you're ready, let's actually run the Python code in A2019.

1. First, create a new bot.

image.png

2. Insert a Python script action

Find Python Script in the menu on the left and open the tree. (You may search.) image.png

Python Script: Open Python Script: Execute script Python Script: Close Drag and place the actions in this order.

I feel like this. image.png

Python Script: Open only Try setting as follows. Other actions can be left as they are this time.

image.png

The Python code is below.

SimpleMessageBox.py


from tkinter import messagebox
messagebox.showinfo('Python GUI', 'message')

This time I selected Manual input and wrote the Python code directly, You can also call a Python source file with a .py extension by choosing Import existing file.

The Python runtime version is as you see it, but if the Python version is 2 series, select 2 or 3 if it is 3 series. Since I am using ver 3.8.0 this time, I have selected "3".

After completing the settings, press the save button. (Don't forget to press the "Apply" button on each node.)

3. Try to run

If you press the execute button and the following message box is displayed, it is successful ☆ 彡 image.png

Not only those who originally use Python, but also those who are new to this time can do various things with Python, so Please take this opportunity to try various things.

Recommended Posts

Run Python code on A2019 Community Edition
A * algorithm (Python edition)
Periodically run a python program on AWS Lambda
Run Openpose on Python (Windows)
Run Tensorflow 2.x on Python 3.7
Run Python CGI on CORESERVER
Run unix command on python
A note on speeding up Python code with Numba
Building a Python environment on Mac
Building a Python environment on Ubuntu
Run a Linux server on GCP
Run Python on Schedule on AWS Lambda
Run TensorFlow Docker Image on Python3
Run Matplotlib on a Docker container
Create a python environment on centos
Run headless-chrome on a Debian-based image
Run TensorFlow2 on a VPS server
Run a simple algorithm in Python
Build a python3 environment on CentOS7
Periodically run Python on Heroku Scheduler
Create a Python environment for professionals in VS Code on Windows
Simple code to call a python program from Javascript on EC2
A story about trying to run multiple python versions (Mac edition)
Run servo with Python on ESP32 (Windows)
Execute Python code on C ++ (using Boost.Python)
Run TensorFlow on a GPU instance on AWS
Build a python environment on MacOS (Catallina)
Run a local script on a remote host
Create a python environment on your Mac
[Python] Run Flask on Google App Engine
A memo with Python2.7 and Python3 on CentOS
Map rent information on a map with python
Run AzureKinect in Python on Christmas Eve.
Run the Python interpreter in a script
Creating a python virtual environment on Windows
Run servomotor on Raspberry Pi 3 using python
A little more detail on python comprehensions
A tool for easily entering Python code
[Python] Run Headless Chrome on AWS Lambda
Run a Python web application with Docker
Build a Python + OpenCV environment on Cloud9
[Python] A progress bar on the terminal
Run Jupyter notebook on a remote server
Run matplotlib on a Windows Docker container
Notes on using code formatter in Python
Run Python in C ++ on Visual Studio 2017
How to run a Maya Python script
Run python wsgi server on NGINX Unit
Create a shortcut to run a Python file in VScode on your terminal
Run a Python file inside a Docker container on a remote Raspbian via PyCharm
Create a Python development environment on Windows (Visual Studio Code remote WSL).
Steps to create a Python virtual environment with VS Code on Windows
Load_data self-made to run Python MNIST sample code on your own dataset
Rock-paper-scissors with Python Let's run on a Windows local server for beginners
How to run the practice code of the book "Creating a profitable AI with Python" on Google Colaboratory
A memo of a tutorial on running python on heroku
Run a Python script from a C # GUI application
Install and run Python3.5 + NumPy + SciPy on Windows 10
Put MicroPython on Windows to run ESP32 on Python
Python on Windows
twitter on python3