|
This isn’t something we’re
likely to implement soon – there’s lots of challenges in getting
this to work. Unfortunately you’ll probably not be able to get it
working from C# either, but this might be a great use for C++/CLI instead.
I believe we do have a bug filed against it, we just won’t get to it
anytime soon J. There’s two big problems
here: #1)
Re-creating the unmanaged CPython interfaces – this will be no small chore #2)
Dealing w/ direct access to the raw object layout. For example I don’t
believe bumping the ref count goes through an API, instead it just uses a macro
which adjusts the raw memory. #1 is by and large just a matter
of someone cranking through and creating the thunks that map into the
IronPython runtime (I’d include the calls into the PYD’s init and
other functions as well here). But #2 is a large can of worms. What
probably needs to happen is VirtualAlloc’ing a block of memory as
read-only, setting up an exception handler, and fixing the memory up at runtime
as it’s accessed – then when changes happen directly to memory the
C# objects can be updated. All in all it’s a huge
project... In the mean time you might be able to find a .NET library that
does the same thing as the PYD and either wrap that in some Python code if programming
against the same API is a must or just program directly against it if that’s
not one of your requirements. Glad you’re having a good
time with it! From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Cassell Is there ever going to be a way to import from a .pyd file
in IronPython? If not, is it possible to interop to a .pyd file in C# in order
to wrap it for use from IronPython? Btw, I’m new to Python, and it has been very enjoyable
and exciting using IronPython. Thanks very much! Josh |
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
