Where to learn the Cpython3 Language?

I have just started working on a Dynamo automation project in my company. I am able to create scripts, but I have a question regarding the Python node in Dynamo.

There are two language options available:

  1. IronPython

  2. CPython3

As I understand, IronPython is outdated and Autodesk is removing its support from Dynamo for Revit. So, we are left with only CPython3 as the future option.

I would like to know where I can learn CPython3 for Dynamo. Is it just a combination of Python 3 and the Revit API? If I learn Python 3, will I be able to understand and work with CPython3 in Dynamo?

I am a bit confused and would really like to learn this properly. If anyone has good resources or suggestions, please share them.

There are 4 engines available for Dynamo’s Python node. IronPython 2 is in fact unsecure and has been for awhile now (approaching 5 years if memory serves). IronPython3, CPython, and PythonNet are all secure though. Each of the later engines run a version of Python 3 while IronPython 2 ran a version of Python 2.

Once you learn Python all 4 engines will make sense and be usable, though each has it’s own intricacies around how you solve various scripting challenges.

You can learn how to use Python in the context of Dynamo via the Dynamo Primer chapters on the subject: Python | Dynamo

1 Like

A couple of additional links which will help you get familiar with python

5 Likes

Just pick a free Python course that suits you. There are loads.

I started with Edube Interactive :: Python Essentials - Part 1

It teaches you the basics and you can apply them in Dynamo.

At first you’re not wanting to re-write Dynamo nodes or anything, you just want to add a bit of extra functionality.

For use with Dynamo, for loops are probably the most useful thing to learn along with if statements.
But don’t limit yourself to that, get a grasp of the basics. :slight_smile:

Learn modern python - Py3 - yes you will be able to understand and work in Dynamo. :slight_smile:

Any weird anomalies you can’t understand - that’s what this forum is for :smiley:

  • Learn the basics of Python (and POO)

  • Learn the basics of .NET

  • Know how to read and search through API documentation

  • And above all, practice and solve problems (the forum is great for that)

  • Avoid solving everything with AI;
    use it, but don’t ask it to just spit out the answer (it’s more rewarding to solve a problem yourself even with AI’s help rather than just copying and pasting an answer; you’ll be more satisfied in the end, even if you encounter setbacks)

If you can use the Pythonnet3 engine, it fixes quite a few bugs compared to CPython3

3 Likes

TIL:
:backhand_index_pointing_right: POO = Programmation Orientée Objet (French)
:backhand_index_pointing_right: OOP = Object-Oriented Programming (English)

In English, “POO” = :poop:

6 Likes

Damn ! , the number of times I’ve used the term “POO” instead “OOP”… oh well… :sweat_smile:

5 Likes