hmPython3が持つ特別な関数一覧デバッグ用途関数デバッグ用途として以下の関数を利用し、「秀丸デバッグモニター」などに値や文字列を表示することが出来ます。
秀丸本体のバージョン秀丸本体のバージョンを数値として取得します。
#PY = loaddll( hidemarudir + @"\hmPython3.dll" ); #_ = dllfuncw( #PY, "DoString", R"PY( from hmPython import hm hm.debuginfo(hm.version) )PY" ); freedll( #PY ); DestroyScope関数
Python内に「DestroyScope」という名前の関数を用意しておくと、
これは、少し時間が長くかかる処理をPython層で実行している最中に、 #PY = loaddll( hidemarudir + @"\hmPython3.dll" ); #_ = dllfuncw( #PY, "DoString", R"PY( from hmPython import hm def DestroyScope(): hm.debuginfo("dll解放の直前に自動的にこの関数が呼び出される。\n") )PY" ); freedll( #PY ); ファイルを2つに分ける場合.mac ファイルにDestoryScope()を直接記述しない場合、 |