アクティビティ
最新
バナーの背景画像
開発者向けのアクティビティ
最終更新日 2024年4月23日

Python スクリプトを読み込み

UiPath.Python.Activities.LoadScript

Python スクリプトのハンドラーを PythonObject 型変数に格納できます。その変数を使用して、コード中のメソッドを呼び出すことができます。メソッドの他にインライン コードがスクリプトに存在する場合は、実行時にそのコードも実行されます。[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 レベルでログに出力されなくなります。
出力
  • 結果 - 指定した Python スクリプトのハンドラーです。PythonObject 型変数に格納されます。
  • プロパティ

Was this page helpful?

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