アクティビティ
最新
偽
- 概要
- 暗号化
- データベース
- Java
- Python
- Web 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 に対応しました。