【发布时间】:2018-08-15 05:22:59
【问题描述】:
我使用 pythonnet 而不是 ironpython。
有这样一个函数:
test(ref string p1,out string p2)
如何在 python 3.6 中调用test?
import clr
import sys
import System
sys.path.append(r'd:\dll')
clr.FindAssembly('communication.dll')
from communication import *
dll=IEC62056()
dll.test(----------)
【问题讨论】:
-
你可以查看类似的讨论here
-
嗯不是最好的解决方案,但为什么不制作一个控制台程序来包装你的 dll,然后从 python 调用控制台程序?
-
@Rahul Agarwal 这个页面是 iropython 而不是 pythonnet pythonnet.github.io
-
@Agent_Orange 对不起,我听不懂,你能给我举个例子吗?
标签: python .net ref python.net pythonnet