[Python.NET] Mono Support

Brian Lloyd brian at zope.com
Thu May 12 16:47:41 CEST 2005


> I must be missing something obvious.  I have come across several
> references to
> Python.Net more or less working with Mono on Linux, although not
> reliably.  The
> thing is, I don't understand how it can work.  The interop assemblies (eg
> CLR.dll) are .NET assemblies, which means they are also PE
> format, not ELF.
>
> On Windows, the DLL is loaded and the CLR initialized automagically by the
> Windows/.NET loaders.  But how does this work on Linux?

The hack of getting CLR.dll to bootstrap Python for .NET into an
existing running CPython does *not* work on Linux. It works on
windows because there is a way to do 'unmanaged exports' from a
managed dll that windows understands. I (ab)use this to trick
CPython into thinking its just loading a normal C extension module.

On linux, you have to run the managed version of python.exe that
comes with the package.


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com




More information about the PythonDotNet mailing list