Visualize def Input

Hi, I’m very new into scripting with Python and scripting overall.
When you call a function in Grasshopper Python Script Editor like:

import rhinoscriptsyntax as rs

rs.LineClosestPoint(

you get like information about the input the function needs in the help panel of the editor.
I asked myself if it is possible to script these informations for your own definitions you create in your script. Like:

import rhinoscriptsyntax as rs

a = 0

def test(x):
    x = x+1
    return(x)

a = test(a)
print a

I wish that when you call the def test( you get some advices in the help panel for the required input.
Hope somebody understands what i’m trying to say :slight_smile: and can help me with this.

Thanks!

Hey @Malcolm_Unger , You could do something like this where you export a function with this docstring format. When you go to use your function in another component then it gives you some hints based on what you wrote in the docstring in the ghPython component up stream

1 Like

based on a post here: Grasshopper python docstring format - #2 by piac