Same code works in "editpythonscript", but not "scripteditor"

I was studying event handler and I found this code on the forum. The same code works in “editpythonscript”, but doesn’t works in the new “scripteditor”. Can anyone tell me why?

print statements need to be in brackets in Python 3. You can also save as .py2 and open it in ScriptEditor, so it runs as python 2

What I meant was when I run it in ‘scripteditor’ with ironpython2 it still didn’t work. And like what you suggested, I did adjust it to meet python3 format and it run without errors. It just didn’t work…The only case it worked is to run it with “editpythonscripts”.

ViewHandler_py3.py (2.6 KB)
This is the code in python3. Thanks.

Ah Ok, I see. @eirannejad do you have an idea what’s going on with that script?