[Python.NET] deprecation of CLR module, implicit assembly loading
brian.d.lloyd at gmail.com
Wed Apr 19 02:29:17 CEST 2006
The current SVN (and upcoming releases) includes changes to support a
IronPython-compatible import syntax and assembly load behavior.
Where in releases to date you had to use the magic 'CLR' module as the root
CLR imports, now you can just say:
from System import *
The old 'CLR' syntax is deprecated but will continue to work until pythonnet
A second job of the artist-formerly-known-as-the-magic-CLR-module was to
way to bootstrap CLR support in an existing CPython installation (by
providing a pseudo-
C-extension). In other words, you had to say 'import CLR' before using .NET
stock Python install.
The next releases will continue to include an (upper-case) "CLR" extension
compatibility, but it will also include a (lower-case) "clr" module that is
with the clr module from IronPython.
The new "clr" module will provide the IP-compatible AddReference APIs to
explicit loading of assembly dependencies, and it will also become the
supported way of bootstrapping CLR support in a stock Python install.
So if you want to use .NET from an existing Python install or ensure that
your code is
portable between IP and PythonNet, you should either arrange for your app to
before using .NET features, or to advise users to add 'import clr' to their
I've tried hard to look at this from every angle and make sure this is not a
for 2.x (though it will be for 3.x), but if you're building on pythonnet and
this will cause
you any problems, please let me know soonest.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PythonDotNet