Bug report: "_-ScriptEditor Run" is not printing anymore

Hello!

I am using the _-ScriptEditor Run .\testrh.py to execute a file as a command but it’s not printing anymore the print() functions.

This has stopped working in the latest versions before it was working:

:x: Rhino 8 SR11 2024-9-10 (Rhino 8, 8.11.24254.15001, Git hash:master @ d3c11108eae09fadc146928ba51b9b182a05303f)
License type: Educational Lab License, build 2024-09-10
:x: Rhino 8 SR10 2024-8-15 (Rhino 8, 8.10.24228.13001, Git hash:master @ f4c93f2b85de4dc69b50ed22f1b0d91445724d03)
License type: Educational Lab License, build 2024-08-15
:white_check_mark: Rhino 8 SR5 2024-3-12 (Rhino 8, 8.5.24072.13001, Git hash:master @ e3530849b75f00b2b977766a567ae29b055837e9)
License type: Educational Lab License, build 2024-03-12

And here’s the simple file I am running:

#! python3

import Rhino

fstringval: str = "STRFVAL"

Rhino.RhinoApp.WriteLine(f"hello {fstringval} rhinoApp.WriteLine.py")  # <-- currently working
print(f"hello from print() {fstringval} print()")  # <-- not working

Anyone has an idea? Many thanks! :open_hands:

Ok so as a workaround and just for info I am using this instead to replace to run scripts via ScriptEditor:

using System;
using Rhino;
using Rhino.Runtime.Code;

string scriptPath = "F:\\testrh.py";
string fileContent = System.IO.File.ReadAllText(scriptPath);
RhinoCode.RunScript(fileContent);

from the very insightful reply here by @eirannejad

@andrea.settimi Which Rhino version are you using? I remember there was a print bug that has been fixed already

hello @eirannejad , thanks for the reply!
I am using 8.11.24254.15001, 2024-09-10 on Windows.

@andrea.settimi Sorry I forgot to respond to this. Would you mind testing 8.12 SRC? I think this was fixed in that version since I can not replicate the bug on my build

1 Like

Indeed! It’s fixed! Thank you for lettting me know!

1 Like