Python

The following overview includes the attributes of Python Job objects and describes their functions, allowed values and ways of modification.

Predefined variables may be used in scripts, and script variables may be set to attributes retrieved via predefined variables.

Python Page

Job Type

JOB_SUB_TYPE

Use it to test if a Job is a Python Job. or example, :set &amp# = get_att('JOB_SUB_TYPE').

Value: PYTHON (in the case of a Windows Python Job) or empty if it is a Windows Job.

Access through: GET_ATT (Pre-Process, Process), predefined variable

Start Parameter: Python Interpreter

INTERPRETER

Value: Path and name of the interpreter executable, for example C:\Python\python.exe for Windows Python.

If the interpreter field is empty (default), the Windows Agent will use python.exe as default and look it up in PATH. If it is not found, the Agent tries with py.exe as well because this is also used on Windows, see the official Python documentation at https://docs.python.org/3/using/windows.html.

The Unix Agent only searches for python if this field is empty.

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process), predefined variable

Start Parameter: Options

OPTIONS

Value: Can be used to pass options to the python interpreter, for example: -X utf8

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process), predefined variable

Start Parameter: Working Directory

WORKING_DIRECTORY

Value: Specifies the Working Directory in which the Job must run. If empty, the current directory is used.

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process), predefined variable

Start Parameter: Requirements

REQUIREMENTS

Value: Contains a list of items to be installed by pip before the Job is executed, see also the pip documentation at https://pip.pypa.io/en/stable/reference/requirements-file-format/.

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process), predefined variable

Job Report: Database

Windows and Unix Python Jobs only.

JOBREPORT_DB

Value: Y/N

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process)

Job Report: File

Windows and Unix Python Jobs only.

JOBREPORT_FILE

Value: Y/N

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process)

Job Report: Generate on error only

Windows and Unix Python Jobs only.

JOBREPORT_ERROR_ONLY

Value: Y/N (always saved)

Access through: GET_ATT, :PUT_ATT (Pre-Process, Process)

See also: