Grasshopper component written in Python

Steve, Giulio, or anyone, any news on this topic ?
I remember at some point there was some talk about streamlining the process of writing GH components in Python, haven’t followed since. I have a bunch of code I’d like to make GH Components out of, but would prefer not to have it re-written in .Net or other. I mean, compiled components, not just text in a GHPython box.
Cheers,
Florin

It is available in the current WIP. I think you might have access to it.

Giulio

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

Thanks Giulio, but can you a bit more specific ? Maybe I wasn’t clear about what I’m trying to achieve. Compile my Python code, with the help of a streamlined template ( similar to the existing VB templates for Visual Studio ) as a Grasshopper component. If this is possible in the current V6 WIP - what exactly is there to aid this process ? I think now there is a py - rvb compiler right ? But can it create a GH component as well ?

[I moved this discussion to Serengeti as this is not yet public content. This gives me the freedom to answer your questions]

If you open the WIP editor, there is an option to use ‘Component compilation mode’ (you can find it after clicking on the puzzle symbol). This gives a Grasshopper-SDK-enabled component to work with, and this component can be used to compile Python dlls that are then loadedby GhPython. The process should be simple enough to be self-explanatory.

Please let me know if you have more questions

Giulio

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

Wow, thanks Giulio, I didn’t notice this before.
This is the best things since the invention of chocolate !

Ahmmm, no joy for saving, but I’m guessing there is something stupidly simple that is not obvious to me.

Inside the code I’m creating s simple rectangle, just wanted to test how it works, but I get the attached error.
Any idea what’s preventing the save ? Compiled component looks ok.

Giulio, I see the compiler creates .ghpy files. Is this just a simple encapsulation for placing it in the menus and the actual python code is parsed by a GHPython component still ? Or is the code broken down to RhinoCommon level ?

I wonder if it’s related to not having entered all the information in the component compile window (component name, category, subcategory) etc…