17

I'm developing a windows 10 universal app in VS15 using the new .NETCore reference assemblies and want to reference the IronPython library. Unfortunately, IronPython targets .NETFramework and not .NETCore. Does anybody know of an alternative library for running python scripts within .NET using C#, a way to make IronPython portable, or a way to work around the project targeting .NETCore? Other possible solutions welcomed. Also does anybody know whether IronPython will become .NETCore compatible/if that's possible? Thank you. PS I am trying to execute very simple python scripts and display the interpreter's output.

5
  • I'm interested too! For the moment i'm using DynamicLINQ and runtime compiled lambdas. Commented Aug 25, 2015 at 9:15
  • @lexLi c# is not really dynamic now, it is jsut better compile and executable as script/ at runtime. Commented Dec 17, 2015 at 21:32
  • Considering that the last release / blog post is from late 2014 (before the .NET Core announcement even) I would consider this project as dead. So in my perspective there will be no port and it would not be a good decision to integrate this library into a production scenario. Commented Jun 27, 2016 at 16:47
  • The DotNet Core team should really focus on Bringing Iron Python to DotNet core. Much functionality is still missing in DotNet Core (Like image manipulation). Cloud services like Azure, AWS, etc support running .Net, Pyhon, and PHP on the same Application. If we had Iron Python we could do Image stuff in OpenCV on Python and everything else on DotNet Core. It would be good to get us by while more things are made for DotNet Core. Commented Jul 31, 2016 at 5:27
  • 2
    @AlfredYoung Do you need to interact with the python script much or just send some arguments? If you just need to run it and get the result, I think the System.Diagnostics.Process and ProcessStartInfo classes that are included in the .Net core will allow you to run python scripts command line style. Commented Dec 13, 2016 at 21:10

1 Answer 1

10

The IronPython-Team just released the beta of IronPython 2.7.8 supporting mono and .net core:

more infos here: https://github.com/IronLanguages/ironpython2/releases

There is also a nuget package IronPython. You probably need to switch from Stable only to Include Prerelease

IronPython 3 with support for mono and .net core is still in progress.

Update: with IronPython 2.7.10, the IronPython-Team added support for .NET Core 3.1.

Sign up to request clarification or add additional context in comments.

4 Comments

2 year update, Iron Python 3 is still "in progress". The repo is marked with a giant DO NOT USE banner.
@ChrisMarisic thats correct. for me, the v2.7 does its job.
It really bites that IronPython 2.7 does not support writing dotnetcore DLLs (clr.Compile) or Python 3.x yet. Specifically I can't find any way to generate a pygments.dll that is compatible with dotnet core. Would love any ideas...
2.7.10 is released! This release adds .NET Core 3.1 support. github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.