UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

开发者活动

Python 作用域

UiPath.Python.Activities.PythonScope

为 Python 活动提供作用域并初始化指定 Python 环境的容器。

“Python 作用域”活动结束时,系统会删除之前加载到该位置的所有 Python 对象。

先决条件

对于 Windows 项目,从 Python 活动包版本 1.9.0 开始, Python 作用域活动会要求您安装 .NET Desktop Runtime 6 及以上版本。

属性

常见

  • “显示名称”- 活动的显示名称。

输入

  • Installed Python Versions - A list of the Python installations detected on the machine. Selecting an installation automatically fills in the Path, Library path, and Target properties, and sets the Version property to Auto. If no Python installation is detected, the list is disabled. This is a design-time feature only; it does not detect installations at runtime.
  • 库路径(Linux 或版本 >3.9)- 对于 Linux,为libpython**.so库的路径,包括库名称。对于 Windows(版本 > 3.9),为python**.dll路径,包括库名称。对于 Windows(版本 <= 3.9),请将此字段留空。
  • Path - The path to the Python environment installation folder (for example, "C:\Users\<User Name>\AppData\Local\Programs\Python\Python<version>"). This field supports only strings and String variables. The path can also point to a Python virtual environment, in which case the packages installed in that environment are resolved at runtime.
  • Log Python Output to File (Diagnostic) - When enabled, the output of the Python process (stdout and stderr) is written to log files in the %LocalAppData%\UiPath\Logs\python folder on Windows, or the ~/.local/share/UiPath/Logs/python folder on Linux. Each log file is limited to 50 MB, and at most 128 log files are kept, with the oldest ones deleted first. The output is not forwarded to Orchestrator. Use this property for local diagnosis only, and leave it disabled in production to avoid accumulating log files. The default value is False.
  • Script Data Size Limit (MB) - The maximum size, in MB, of the data passed to the Python script as method arguments. If the size of the arguments exceeds this limit, an error is raised. If left empty, the default value of 25 MB is used. To work with data larger than the limit, save the data to a file and pass the file path to the script instead of the data itself. This field supports only Int32 variables.
  • Target - The Python runtime platform. Choose one of the two available options: x86 or x64.
  • Timeout - The amount of time in seconds to allow a Python script to run until it is terminated and an exception is thrown.
  • “版本”- 此为版本下拉列表,用于从中选择要使用的 Python 版本。默认情况下,该属性设为“自动”
    备注:

    当设置为自动时,该属性仅检测 v3.5 及更高版本。

  • WorkingFolder - Used to specify the working folder of the scripts executing under the current scope. This field supports only String variables.

其他

  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。
  • 先决条件
  • 属性
  • 常见
  • 输入
  • 其他

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新