Greetings from Dynamo Team. We hope you are doing well in this special situation.
Today I am writing to give you a preview of the upcoming Python 3 support we will add to Python workflows starting from Dynamo 2.7.x releases. We will keep you in loop with all these changes and hopefully get feedback when things do not make sense jump to your eyes. You will be able to try it out using our daily builds on dynamobuilds.com.
The new Python node engine lable on lower right corner of Python nodes
The new Python node engine switcher in node right click context menu
The new Python script editor and Python3 learning material in right side panel in progress
Updated layout of controls in Python Editor
Added Icons and tooltips for controls in Python Editor
Added a Python Engine switcher for user to switch which version of Python Engine per node they would like to leverage
Added a button like control in Python3 learning material for user to report an issue here
Added minHeight and minWidth for Python Editor so controls can always be visible
We will also keep track of Python3 related issues in this thread and you will have an option to report Python3 related issue here directed by a button in Dynamo right side panel (see screen shot above). There is a known list of Python3 issues tracked on our Dynamo wiki.
What!?
So cool.
We were so limited in so many workflows with ironPython 2.7
Please tell me you will push this improvement in all flavors of dynamo core and dynamo4Revit @Aaron_Tang
It will probably get pushed to the core version then the revit team will integrate and push it out in a update. Though i doubt this would be pushed retrospectively to early versions.
Good to see that the dynamo team have found a version to work with dynamo without much visible changes after i indicated python 2 was going to be unsupported while i was at the uk dynamo hackathon last year
For those of us only familiar with IronPython via Dynamo, is there any chance for differences (syntax changes, deprecations, etc.) that could cause problems between versions? How is that being handled?
@Nick_Boyts yes there are some differences between Python 2.7 and Python 3.7, some are related to the way you open files for example, others are less important for a Dynamo workflow. The real issue is that there is no guarantee that the IronPython syntax will be the same for CPython (e.g. typed arrays, context managers for object implementing IDisposable, etc.). It will be a journey.
It is covered partially by the learning material in Dynamo 2.7.x. We are also working on migration helper for users who will be in transition, but that maybe in future releases. @solamour Should be able to cover a much larger plan overall later.
There will be some syntactical changes between IronPython2 and CPython3 for sure. We are looking at mitigating as much as we can on our end and will be providing a migration assistant to help you migrate your code (Albeit it won’t cover everything that changes).