How to define input and get output with Rhino.Runtime.PythonScript

I’m working on invoking python script in C#.
Found Rhino.Runtime.PythonScript to do that.
But how do I define input in python or get output from python(E.g. string in python’s print)?
I know PythonScript.Output Property but don’t know how does it work…

SetVariable() and GetVariable() can do these, but seems that ExecuteFile() have problems

@piac - is this something you can help with?

Hi @s.wildgold . Thank you @dale

Rhino.Runtime.PythonScript is what GhPython uses to run Python scripts.
The project has been handed over to @ehsan, but it’s still working, so I think everything is still in perfect shape there. When I was working on it, I kept a public repo more-or-less up-to-date.

You can still look at how it works.



Giulio Piacentino
for Robert McNeel & Associates