Is there a way to use .NET DLL from Python

Christian Heimes lists at cheimes.de
Thu Feb 7 14:22:18 EST 2008


Huayang Xia wrote:
> What's the difference between .NET DLL and normal C DLL? Do you mean
> after clr.AddReference('ClassLibrary1'), there is no need to import
> ClassLibrary1?

A normal DLL and an assembly DLL share only the header. The rest is
totally different. You can see the DLL as a container for the CIL code.

clr.AddReference('ClassLibrary1') makes the namespaces of the
ClassLibrary1 assembly available to IronPython and PythonDotNET. import
ClassLibrary1 imports the name space. You must import the assembly
before you can use its name spaces.

Christian




More information about the Python-list mailing list