python-I-interface
You can access a python component in Grasshopper where you can edit and run your script.
A Python component in grasshopper works as every other component and it follows the dataflow direction of grasshopper: input from left, output from right.
Attention, in python inputs you must specify your inputs in two ways. On the left, if it is a single object, a list, or a tree. But also the datatypes contained in it, for more info see the variables chapter.
If you double-click the component your will open up your text editor where you can edit and run your script directly from grasshopper environment.
This is the text editor in Grasshopper.
And this is an error. You will face this many many times so it is important to understand where to look for information to troubleshoot your code.
In the output section of the editor you will find information about the location of the error in the code and additional info about its nature.
Now that we are familiar with the basic interface of Python in Grasshopper let’s take up some basic programming concepts such as the one of variables.