そういう場合は、環境変数に書き込むか、一時的リリースのToolなんかだったら、一時的にpythonパスをソースから追加することでインポートが可能です。
サンプルソース;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def append_PythonPath(PyPath=None): | |
sys.path.append(PyPath) | |
append_PythonPath('任意のパス') |
0 件のコメント:
コメントを投稿