Is there a way to use .NET DLL from Python

Luis M. González luismgz at gmail.com
Fri Feb 15 07:22:37 EST 2008


On Feb 14, 6:26 pm, Fuzzyman <fuzzy... at gmail.com> wrote:
> On Feb 13, 6:58 pm, "Luis M. González" <luis... at gmail.com> wrote:
>
>
>
> > On 13 feb, 00:26, Dino Viehland <di... at exchange.microsoft.com> wrote:
>
> > > >> Oh, I know what you mean.
> > > >> But that was exactly the reason for having a .DLLs folder, isn't it?
> > > >> When you place an assembly into this folder, you avoid having to write
> > > >> this boilerplate code, and simply import the assembly as you would
> > > >> with a normal python module. At least, that´s how it worked in
> > > >> previous versions...
> > > >No. You have always had to add references to assemblies before being
> > > >able to use the namespaces they contain. You even have to do this with
> > > >C# in Visual Studio.
>
> > > This *should* work in bothIronPython1.x and IronPyton 2.0 - the catch though is that it's implemented in the default site.py we ship with.  So if you do the usual thing and use CPython's Lib directory you'll lose this feature w/o copying it over.
>
> > Sorry Dino, I don't understand...
> > What does Cpython's Lib have to do with it?
>
> If you have the CPython standard library in your IRONPYTHONPATH, then
> when IronPython does it's normal 'import site' on startup the CPython
> one will be used instead of the default IronPython one...
>
> Michael Foordhttp://www.manning.com/foord

I see. Thank you!

Luis



More information about the Python-list mailing list