| Using CLR and .NET Framework Classes |
IronPython brings together the elegant Python programming language and the powerful .NET platform. Common Language Runtime (CLR) forms the core execution engine of .Net platform. Along with the runtime comes a vast array of libraries and classes, collectively known as the framework classes. IronPython is a full .NET language and almost all features of the .NET platform can be used.
MeteoInfo script is using IronPython engine, so you need some basic knowledge of Python and .Net framework for programming MeteoInfo script. ¡°IronPython in Action¡± is a good reference book on it.
To use the classes of .NET, import CLR first and then add references to the .NET assembly. For example, the classes included in System, System.Windows.Forms and System.Drawing name spaces will be available using following codes.
import clr
clr.AddReferenceByPartialName("System.Windows.Forms")
clr.AddReferenceByPartialName("System.Drawing")
from System.Windows.Forms import *
from System.Drawing import *