I have created a Python file, called vector_methods.py, with handy functions that work in accordance with rhinoscriptsyntax. I want to be able to import my library in Rhino and Grasshopper Python, but I don’t know where I have to put the vector_methods.py?
To be clear I want to be able to import the methods of vector_methods.py in other Rhino Python scripts and within the Grasshopper Python Component. I have the latest version of Rhino 5 for macOS!
Put it in the same folder rhino stores it’s scripts in by default. When you type ‘_EditPythonScript’ rhino will show you the location. You can import any python file in the scripts folder into ghpython nodes and rhinopython scripts it’s as simple as writing
In Rhino for Mac, ‘_EditPythonScript’ is an unknown command. It doesn’t open the Script Editor like on Windows. All you can do to run Python script is, use the command ‘RunPythonScript’, which just opens a system dialogue, where you can select your Python file and upon confirmation, Rhino will run it in the background.