アクティビティ
最新
バナーの背景画像
開発者向けのアクティビティ
最終更新日 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 に対応しました。

プロパティ

共通
  • 表示名 - アクティビティの表示名です。 このフィールドでは String 型の変数のみがサポートされています。
入力
  • コード - 実行する Python コードです。このフィールドでは String 型の変数のみがサポートされています。
  • ファイル - 実行する Python コードが含まれているファイルへのパスです。このフィールドでは String 型の変数のみがサポートされています。
その他
  • プライベート - オンにした場合、変数および引数の値が Verbose レベルでログに出力されなくなります。
  • プロパティ

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.