GHIronPython REPL


(YGH) #1

Hi !!!
I’m working with GHpython thesedays then I got question

is there any way change python setting to REPL mode or something?

thanks in advance…


(Alain Cormier) #3

Hi,
Typing code in the component editor and clicking the Test button gives you immediate feedback. Can you clarify why this is needed and how it would improve your workflow?


(YGH) #4

Sorry for super lack of my vocabulary…

For example, this result is displayed after python read all the code, right?
So each “print” sentence come out at the same time.

But I wanna check the result at each time python read a line then I can make sure if the program work properly.

the reason why I thought I can do that is when I click next to the number, red button is appeared!! it seems to be sort of break point which is used in REPL program language I assume…

whats more, I thought i can stop running where I put the red button though, actually I don’t know how to use it. Could you tell me how to use it?


(Alain Cormier) #5

If you attach the ‘out’ parameter to a ‘Panel’ you’ll see the outputs of your print statements.

There’s no debugger in GhPython but you can debug some of your code outside of Grasshopper using the ‘EditPythonScript’ Rhino command.


(YGH) #6

I understand. Thanks!!

but Then what’s this red button in GHpython?


(Alain Cormier) #7

it just happens to be part of the editor and not used.


(YGH) #8

Oh I see…

Thanks so much!!