IronPythonの.pyなどの標準モジュールの読み込み

概要

ここでは、IronPythonの標準ライブラリを読み込む方法が記載されています。

sys.path.append(...)で、IronPythonのlibフォルダの場所を足す

IronPythonのモジュールをロードする場合には、
秀丸とIronPythonは「離れた場所にある」ため、
そのライブラリフォルダをpathへと足しこむという手順が必要となります。

#PY = loaddll( hidemarudir + @"\hmPy.dll" );

#_ = dllfuncw( #PY, "DoString", R"PY(
import sys
sys.path.append(r"C:\usr\ironpython\lib");

import random

ret = random.random();
hm.debuginfo(ret);


)PY"
);

freedll( #PY );