我尝试了非常简单的dll导入,但没有出现名为error的模块。
我的配置是 IronPython 2.7.5 安装路径是" C:\ Program Files(x86)\ IronPython 2.7"
1)我的来源foo.py:
class foo:
def hello():
print "hello"
2)制作dll模块
ipy "Tools\Script\pyc.py" /main:foo.py / target:dll
--> Success, I got foo.dll
3)检查1
ipy
>> import foo
>>
-->Importing Success
CHECK2
Delete source foo.py, leave only foo.dll
ipy
>> import clr
>> clr.AddReference("foo")
>> import foo
-> ImportError: No module named foo
我在" C:\ Program Files(x86)\ IronPython 2.7" 。目录