Python - Get Selected On Selection Change Event Handler

That script relies on the GHPython component running in SDK mode. I’m not sure what the current status is with the new script editor supporting this feature, but either way I’d suspect it might require the component to be running IronPython (i.e. not CPython, which seems to be the case with the component in your screenshot).