Paul Krill
Editor at Large

Pythonnet brings Python to Microsoft .Net

news
Feb 1, 20172 mins

The package provides tools and scripting supported, but Python does not become a first-class CLR language

illustration of arm holding a serving tray
Credit: Thinkstock

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author