Is there a way to use .NET DLL from Python

Dino Viehland dinov at exchange.microsoft.com
Tue Feb 12 22:26:24 EST 2008


>>
>> 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 both IronPython 1.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.



More information about the Python-list mailing list