我可以从Windows DLL调用Python脚本吗?

2024-09-27 23:22:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我们想从ZBrush内部调用一个Python应用程序,它的API非常有限。一个选项是FileExecute命令,它从Windows DLL调用方法,如下所示:

[FileExecute, PluginTest.dll, ShowMsg, "Hi There"]
# Executes the "ShowMsg" routine in "PluginTest.dll" passing it the string "Hi There"

Windows Python安装中是否包含一个DLL,我们可以用它来调用任意Python脚本?你知道吗

[FileExecute, PythonWindows.dll, RunScript, "example.py"]
# Runs the "example.py" script (found on the PYTHONPATH)

如果没有,您将如何创建这样的DLL?你知道吗


Tags: thepyapi应用程序examplewindows选项hi

热门问题