The version of Python inside of Rhino is IronPython 2.7. It appears after over a decade of work to transition to Python 3 the Python Software Foundation is finally going to stop release updates to Python 2 Python 2 Sunset Statement. What is the future direction of the Python embedded in Rhinoceros. Are you working on using the new beta IronPython 3.X, or will you staying at 2.7? Staying at 2.7 would be helpful for keeping older GH Python scripts working, but sometimes it can be hard for developers to switch back and forth from Python2 to Python3.
There is no IronPython 3 beta or even alpha. The project seems stalled for a long time and don’t see the future of it. We need Python 3 for Rhino, not dead IronPython! Look at Python scripting for Blender or Fusion 360 and compare it to Rhino! In all the tutorials I see for Rhino python authors rarely use .Net part of IronPython.
Almost all Rhino python authors use .NET. That is the what RhinoCommon and Grasshopper DLLs are written in. If you aren’t interacting with these APIs then it doesn’t make a whole lot of sense to be running your python scripts inside of Rhino.
We will most likely investigate the possibility of supporting multiple python runtimes in the future.
See here for an older discussion of this
The Ironpython 3 project is advancing slowly. I wouldn’t write it off but wouldn’t bet my development plans on it either at this stage.
An alternative for CPython integration is Rhino3dm + rhinocompute.
I’ve found Ironpython to be a great replacement for Rhinoscript - I use it happily with zero interaction with the rest of .Net.
Graham
I have the luck to not be biased much about this. Since my biggest Python advancement has been using IronPython. I have to say that unless you rely on 3rd party modules for CPy3 there isn’t that big of a difference and you can easily make a script run in both distros. Also using IPy2 is not a disadvantage either. CPy3 has PyPI but IPy2 has Nuget.
It was weird at the beginning but I even started coverting my old CPy3 scripts to IPy2. The advantages that dotnet adds is great. (Well, at least for win and mac users).
The only thing I am missing regarding Rhino is better behavior of the editor and/or integration of external IDE.
Oh, yes. I also started to code in IronPython outside Rhino. I recommend downloading IPy2 and check what it can do.
Nothing is that good without ongoing development and support. IronPython will be the next Rhinoscript needing replacement. And the third part modules is the key here.
Could you explain why does it need a replacement?
What is it that is not working?
Or is it just the inconvenience?
That would be fantastic
Hi Graham,
FYI:
RhinoPython rhinoscriptsyntax modules all rely on the API to .NET.
They tap into .NET to send and recieve data to and from RhinoCommon
It may look you are using only python, but in the back it’s all Ironpython connecting to .NET
-Willem
no it does not
I think Graham might have meant this RhinoScript
:
Using IronPython is betting on a dead horse. If you replace IronPython with CPython many scripts are likely not to run anymore, just as replacing PythonScript with another DotNet language. Hopefully the IronPython devs get it done somehow, but chances are pretty low I guess.
But since IronPython is DotNet, is this “sunset” message irrelevant anyway?
Perhaps, but at least it did manage to ride its way into the .NET foundation:
https://ironpython.net/blog/2017/11/14/ironpython-and-dotnet-foundation.html
Whatever that’s worth
Maybe the future is just .NET Core which is cross-platform and actively developed?
definitely, but that doesn’t solve that C#, the flagship of Microsoft, is so much hated by the Hipster culture, and Python is not. Dotnet/Core is a great framework for building Desktop apps and C# is just as a great language as Python is. Sometimes I just don’t understand the need to support Python syntax just because its subjectivly better. It really isn’t and moving from one to another isn’t such a great deal at all. The whole idea of IronPython is just based on that. I can also understand that the effort in supporting both frameworks, for a small company as McNeel is, might be a total overkill.
I’d say
Don’t get me wrong, I’m not against Python. Its just odd to write C# code with Python syntax because it has more acceptance or whatever the reason behind this project was.
But yes my personal oppinion is subjective.I believe the argument for seeing Python syntax as overwhelmingly good is just quite often based on the same faulty statement that everyone can code, can model an can be President… anyway, just coming back to the initial question.
IronPython is DotNet, isn’t this “sunset” message irrelevant anyway?
Not faulty at all, it’s true for all three. There is just no mention of quality in that statement.
My take as someone who’s just dipping their toes into python is that Rhino should either move to 3 or admit that python support is essentially dead and direct everyone to the other options already mentioned.
I can’t imagine that very many new developers or students would have any interest in learning the quirks of a language that has no support.