活动
最新
False
- 概述
- 加密
- 数据库
- Java
- Python
- 网页 API
开发者活动
上次更新日期 2024年4月23日
运行 Python 脚本
UiPath.Python.Activities.RunScript
使您能够执行 Python 代码。 您可以直接在活动中输入代码,也可以为其提供文件路径。 只能在“ Python 作用域 ”活动中使用。
Due to a software limitation, this activity uses, by default, the installation location of the Python activity package as the run directory for the script. To change this, and to be able to use relative paths inside the script, you can add the following code to the loaded script as a workaround:
import sys
import os
sys.path.append(os.path.dirname(os.path.realpath(<em>file</em>)))
import <your module here>
import sys
import os
sys.path.append(os.path.dirname(os.path.realpath(<em>file</em>)))
import <your module here>
注意: Python 活动包现在与 .NET 6 Windows 兼容。