Python library

OverView

Overview

A Python library is a library that runs .py files.

You can run the py file in the environment where Python is installed.

The package imported from the py file must be installed for normal operation.

The functions available in the Python library are:

You can refer to the sample for the Python library using the designer or Windows Explorer.

Designer path: Menu > Help > Sample > Python

• windows explorer path: C:\Users\user\AppData\Roaming\Brity RPA Designer\samples\Python

[Python sample project name and related libraries]

• Python_Sample: ExecutePythonFile

Installing the Python library

For installing the Python library, refer to page 5. Installing Add-In Library.

Close both BrityRPA Designer and Bot before installation.

Common Properties

Common Properties

MORE OPTIONS

MORE OPTIONS properties

Properties

Type

Required

Unit

Auto-setting

Description

On Error

Combination box

N

-

N

Specify an action to carry out when an error occurs at the time of execution.

- If not specified: Output errors and exit the task.

- --Ignore--: Ignore the error.

- --Retry--: Try the activity one more time.

- --Goto--: Try the scenario for the specified time if the activity fails.

- _Event: Select an event created within the project.

DESCRIPTION

카드 속성

Properties

Type

Required

Unit

Auto-setting

Description

Description

Text

N

-

N

Add a description for the activity card.

If a Description is entered, it is displayed in the description of the corresponding activity in the flowchart. If there is no Description, a representative value is displayed in the description of the activity.

ExecutePythonFile

ExecutePythonFile

Overview

Executes the specified py file.

Application Procedures

  1. Enter the path of the py file to be executed in FilePath.

  2. In Arguments, specify the arguments to be input to the py file.

  3. Specify the maximum execution time of py in Timeout(ms).

Card properties

Array1D_Clone 카드 속성

Properties

Type

Required

Unit

Auto-setting

Description

FilePath

Text

Y

-

N

Enter the path to the py file to run.

Arguments

Text

N

-

N

Specifies the arguments to be entered in the py file.

Timeout(ms)

Interger

Y

-

Y

py Specifies the maximum execution time. Forces execution to end after a specified amount of time.

More Option

-

-

-

-

Python library common properties.

DESCRIPTION

-

-

-

-

Python library common properties.

Example of utilization

Executes the specified py file.
source code(test.py)

import sys
def test():
 print("my name is", sys.argv[1], sys.argv[2])
test()

AddDateTime1

Sample file
Used properties 

Example of utilization

Execution will fail if LogisticRegression package is not installed.
source code(test2.py)

from sklearn.linear_model import LogisticRegression
clf = LogisticRegression()

AddDateTime1

Sample file

Used variables