dotnet add package IronPython --version 3.4.1
NuGet\Install-Package IronPython -Version 3.4.1
<PackageReference Include="IronPython" Version="3.4.1" />
paket add IronPython --version 3.4.1
#r "nuget: IronPython, 3.4.1"
// Install IronPython as a Cake Addin #addin nuget:?package=IronPython&version=3.4.1 // Install IronPython as a Cake Tool #tool nuget:?package=IronPython&version=3.4.1
IronPython is an open-source implementation of the Python programming language that is tightly integrated with .NET. IronPython can use .NET and Python libraries, and other .NET languages can use Python code just as easily.
This package contains the IronPython engine that allows embedding an IronPython interpreter in a .NET application. The interpreted Python code can call the .NET code and can be called from the .NET code. This package does not contain the IronPython Standard Library, which is distributed separately as package
Execute Python code and call it from .NET code:
var eng = IronPython.Hosting.Python.CreateEngine(); var scope = eng.CreateScope(); eng.Execute(@" def greetings(name): return 'Hello ' + name.title() + '!' ", scope); dynamic greetings = scope.GetVariable("greetings"); System.Console.WriteLine(greetings("world"));
Differences with CPython
While compatibility with CPython is one of our main goals with IronPython 3, there are still some differences that may cause issues. See Differences from CPython for details.
See the Package compatibility document for information on compatibility with popular Python packages. Note that to run most packages, IronPython Standard Library must be present.
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed.|
|.NET Core||netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible.|
|.NET Standard||netstandard2.0 is compatible. netstandard2.1 was computed.|
|.NET Framework||net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen40 was computed. tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
NuGet packages (61)
Showing the top 5 NuGet packages that depend on IronPython:
The Python Standard Library, for use with IronPython.
DaisyTech PreTool Data
Provides the infrastructure for executing Python scripts. Typically used areas and classes/interfaces/services: - PythonLanguageService. Kephas Framework ("stone" in aramaic) aims to deliver a solid infrastructure for applications and application ecosystems.
CubeBuild Core is the dependency libraries for the public release CMS CubeBuild. It is incorporated into the default CubeBuild project, or can be integrated into any ASP.NET MVC application as an inbuild content manager.
GitHub repositories (28)
Showing the top 5 popular GitHub repositories that depend on IronPython:
Reko is a binary decompiler.
Unified lighting effects across multiple brands and various games.
Mission Planner Ground Control Station for ArduPilot (c# .net)
Open Source Graphical Programming for Design