[IronPython] Transparent import of dlls?

Jeff Hardy jdhardy at gmail.com
Tue Mar 29 16:30:51 CEST 2011

On Tue, Mar 29, 2011 at 4:30 AM, Markus Schaber
<m.schaber at 3s-software.com> wrote:
> For IronPython, there is the pyc.py compiler script. This allows a python
> module to be precompiled into a .NET dll. However, it seems that it is not
> used transparently when placed in a directory in sys.path, one has to
> explicitly add a Reference to the dll (via clr.AddReference or hosting API).

That, currently, is the only way to do it.

> We’re currently using IronPytho 2.6 in a hosted .NET 2 environment.

For ipy.exe, there's a special directory called 'DLLs' that it reads
on startup and does the hosting equivalent of clr.AddReference for
each .dll in the folder. That's about the best you can do right now.

I've been thinking of adding support for .ipyd files (similar to
Python .pyd files), which could handle this case, but haven't thought
it through yet.

- Jeff

More information about the Ironpython-users mailing list