[IronPython] [python] *.pyd files usage in Iron python

Michael Foord fuzzyman at voidspace.org.uk
Wed Dec 26 18:45:10 CET 2007

John Fletcher wrote:
> All,
> I am trying to port the existing Python code to Iron python. To use 
> most of the existing python functionalities , I have a path to the 
> python installation(ie C:\python24\lib) in my *.py files. With this I 
> am able to import all the python libraries like "os", "clr" etc., But 
> if I try to import the libraries in *.pyd file, my execution complains 
> about its non-existence (eg: win32file, win32net, though they are 
> present in C:\python24\lib\site-packages\win32 ).
> Could any one let me know, how to deal with it ? or where can I get 
> the corresponding *.py files ?

 From the FAQ ( 
- why is this a download?):

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.

There is one approach - but really you are better off looking for native 
ways of doing what you need from IronPython:



> Cheers,
> John
> ------------------------------------------------------------------------
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list