[Ironpython-users] Fwd: importing .net assembly as module in a package
Pawel Jasinski
pawel.jasinski at gmail.com
Fri Jan 11 18:00:34 CET 2013
---------- Forwarded message ----------
From: Pawel Jasinski <pawel.jasinski at gmail.com>
Date: Fri, Jan 11, 2013 at 5:58 PM
Subject: Re: [Ironpython-users] importing .net assembly as module in a
package
To: Jeff Hardy <jdhardy at gmail.com>
On Fri, Jan 11, 2013 at 5:02 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
> On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski
> <pawel.jasinski at gmail.com> wrote:
> >
> > hi,
> >
> >
> > I am looking for a way to use module created as .net assembly as part of
> the package
> >
> > So instead of having:
> >
> > import clr
> > clr.AddReferenceToFileAndPath(".\maplookup.dll")
> > import maplookup
> >
> > I prefer:
> >
> > import clr
> > clr.AddReferenceToFileAndPath(".\maplookup.dll")
> > import xmldiff.maplookup
> >
> > Is there any way to accomplish it?
>
> What is xmldiff? Is it an existing Python package?
>
xmldiff is located in site-packages
>
> Also, is maplookup just a .NET class, or is it actually a PythonModule
> class?
>
this is PythonModule class but compiled separately from IronPython
[assembly: PythonModule("maplookup", typeof(maplookup.maplookup))]
namespace maplookup {
public static class maplookup {
public const string __doc__ = "test string";
...
}
I owe the explanation here. xmldiff is a python package with one module
implemented as C extension
What I am trying to do, is to port this C extension as .NET class.
This would be analog to porting build-in C modules into .NET but outside of
the IronPython.
>
> - Jeff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20130111/2c5196db/attachment.html>
More information about the Ironpython-users
mailing list