PYMXS NAMERDENT NODES

import pymxs
mxs = pymxs.runtime
thing = mxs.getCurrentSelection()[0]
thing.name = mxs.name("FooBar")
#or
thing = mxs.getCurrentSelection()
thing[0].name = mxs.name("FooBar")
Hunin and Munin