Executes a Python script or expression within the PlanetCNC environment.
py(code) py(code, use_subinterpreter)
Execute a Python expression
py("2 + 2"); // returns 4
Execute a Python script
py("print('Hello from Python')");
Run a Python file
py("C:/scripts/myscript.py");
Execute Python code using the main interpreter
py("import math\nprint(math.sqrt(16))", 0);