Dear All:
I am learning the ‘input’ fuction by follow the intro book to write the script in command window, but it returns back a red message. It is weird to me as I just copy the script line from book to test, but without getting back a same answer as it is written in the book.
Here I type the sentence ‘CHUCK’ as written in the book.
Below it the sampe and what I typed in Pyton in rhino.
Could any professor tell me why this happens? It is very simple line that I didn’t expect to meet such problem…
Message: name 'CHUCK' is not defined
Traceback:
line 1, in <module>, "C:\Users\Lenovo\AppData\Local\Temp\TempScript.py"
line 1, in <module>, "<string>"
The input() function (cf. documentation) is from Python 3 and reads user input from a command line or terminal. In Rhino, you should use what @Helvetosaur proposes above.
Rhino 7 also still uses IronPython 2.7, so you should use print "This and that", instead of the print() function from CPython 3.
Let me have a test, thank you!
I read the PDF for learning it. Seems the process is manipulated in a window that opened by rhino. Python, So I just write and test there.
Let me make sure of the platform first.
THX
Hi, Diff.
How are you! Long time I am away from here, LOL. Happy new year!
Thanks for your suggestion.
Upon all your help I think I can handle the problem now. Let me try.
Yep. Actually tmr is the last day of celebrating the coming of new year, another get-together day:D
SG has similar tradition as Asian ppl share some common festivals,LOL