How can I import a .PYD module in IronPython?

我的梦境 提交于 2019-11-29 12:51:26

You can check out IronClad which is working to provide this support. It may or may not work w/ your PYD of choice.

A .pyd file is a DLL. So unless IronPython (which is written in .net) can correctly load C DLLs written for CPython, you might be out of luck.


Update

In fact, according to the IronPython FAQ, you are unfortunately unable to import .pyd files:

Q: How do I build and call into PYD libraries?

A: IronPython does not support using PYDs built for CPython since they leverage implementation details of CPython. You can get a similar effect for new "PYD"s you would like to implement by writing them in C# or VB and building a DLL for .NET.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!