Grasshopper

algorithmic modeling for Rhino

Hi all,

Does anyone know where the Python scripts in the Py components are saved to?

Thanks in advance!

Views: 1069

Replies to This Discussion

Just to clarify my question, when using the Python script editor the scripts may be saved to:

C:\Users\Jason\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts    folder

What happens in Grasshopper with the Python compnents? I would like to be able to look at the python scripts in my components without having to open them up in Grasshopper.

At the moment, I have a solution that feels too stupid to be correct. (Saving as .ghx file and then parsing the xml file for the Python code).

Thanks.

Hi Jason

can you say what you are trying to do more in general? Is this in order to debug?

At the moment you are right: Python scripts are only saved into the .gh/.ghx file, there is no other location on disk that mirrors it.

Giulio

--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Hi Giulio,

Thanks for replying. I am going through students grasshopper definitions and want to see what they changed in the Python components over time (the scripts are usually quite simple).

For example, how many times do they use a particular function in a library i provide.

I am not even sure if this is a good idea at the moment, but if it is possible and non-trivial to parse the Python code automatically - why not?

you're first idea, saving as .ghx and extracting code from the xml, is the only way I know.

Mh, I see. Are you, Jason, trying to do this from Grasshopper or from an external IronPython console?

Giulio

--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

I will do it from an external console.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service