While is input() not working in Python3.x for Rino 8?
Even this basic scritp does not work
datain=input(“Insert string”)
While is input() not working in Python3.x for Rino 8?
Even this basic scritp does not work
datain=input(“Insert string”)
Hi @Luciano_Battaia,
Try this:
#! python3
import rhinoscriptsyntax as rs
str = rs.GetString("Enter some string")
if str:
print(str)
– Dale
Thank you for the quick answer. Indeed I knew this possibility, but this means that a normal Python3 file will not run in Python for Rhinoceros.
Thanks.
Luciano
That is correct, input
is not recognized in Rhino (neither in IronPython 2.7 nor in Python 3). You are in the Rhino environment, and that is how strings are input.
Ok. But using EditPythonScript the old IronPython 2.7 Compiler is used and here inpu(), or better raw_input(), works, as in normal Python Programs.
Indeed as far as I have been able to check (I have downloaded the evaluation version of Rhino8 only 5 days ago, after many years of practice with both 6 and 7) this is the only Python function that is not recognized as it is in Rhino environment.
Thank you all for the useful information. I think I’ll upgrade to Rhino 8 that seems great!
Luciano