Hello @dale , thank you for your reply!
I see for RhinoApp.RunScript.
I tried with Rhino.Runtime.PythonScript.Create().ExecuteFile(py_file) and it does run from a thread but the only problem is that it fires IronPython instead of CPython.
Is there any callback to call the function on the main UIThread? or really any a workaround/documentation to call this script from the background thread in Python?
In addition, since the RhinoApp.InvokeOnUiThread wants a Delegate method (a ref to a method?), which in python does not exist I also tried to pass the function as a bound function aka lambda,
It does not raise an exception and it doesn’t crash (good news?). The problem is that the content of the function e.g. AddCircle() is not running, i.e. the circle is not added to the space.
For that matter even a simpler RhinoApp.WriteLine("HelloWorld") does not show the print in the V8 terminal.