The Pythonnet package gives Python developers interoperability between Microsoft's .Net Common Language Runtime and the CPython implementation of the language.
Also known as Python for .Net, the package lets developers script .Net applications or build entire applications in Python, using .Net services and components built in any language targeting the CLR. It also provides an application scripting tool and enables Python code to be embedded into a .Net application. But there are limitations.
"Note that this package does not implement Python as a first-class CLR language -- it does not produce managed code (IL) from Python code," the GitHub description notes. "Rather, it is an integration of the CPython engine with the .Net or Mono runtime."
Developers thus can use CLR services and existing Python code and C-based extensions while still having native execution speeds for Python code. The Pythonnet team is working on CLR support and want to have Pythonnet work as it would be expected in Python except for cases that are .Net-specific, in which case the intent is to work as developers would expect in C#.
On Windows, Pythonnet supports version 4.0 of the .Net CLR, and it works with Mono, the open source, cross-platform .Net framework, Linux, and MacOS. For a pure managed-code implementation of Python, Pythonnet builders recommend IronPython, an open source version of Python integrated with the .Net Framework.
Pythonnet is another example of the growing popularity of Python, which has seen a boost with its usage in artificial intelligence applications and has been lauded for ease of use. Google, with its recent Grumpy project, began bridging Python to the search giant's own Go language.
Sign up for CIO Asia eNewsletters.