---------- Forwarded message ---------- From: Pawel Jasinski <[email protected]> Date: Fri, Jan 11, 2013 at 5:58 PM Subject: Re: [Ironpython-users] importing .net assembly as module in a package To: Jeff Hardy <[email protected]>
On Fri, Jan 11, 2013 at 5:02 PM, Jeff Hardy <[email protected]> wrote: > On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski > <[email protected]> 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 >
_______________________________________________ Ironpython-users mailing list [email protected] http://mail.python.org/mailman/listinfo/ironpython-users
