o = PyNode('MyObj')
# set the enum list (assuming the attr is already added and is an int)
o.myAttr.setEnums( ['xyz', zyx', yxz' ] )
# get the enum list we just set
enums = o.myAttr.getEnums()
# get the enum as an int
val = o.myAttr.get()
# get the enum as a string
val = o.myAttr.get( asString=True )
# set the enum as an int
o.myAttr.set( 2 )
the new addition:
# set the enum as a string
o.myAttr.set( 'xyz', asString=True )
-chad