Set a propertie to an object
by
Wyden Silvan
—
last modified
06.11.2009 08:48
def setProperty(context, property, value, type='string'):
if context.hasProperty(property):
context.manage_changeProperties({property: value})
else:
context.manage_addProperty(property, value, type)
setProperty(context, 'myproperty', 'myvalue')
#get the property
myproperty = context.get('myproperty', none)
