Is it possible to export parameter data from a parameterized object without including the name?
From one of
obj1.param.values()
obj1.param.serialize_parameters()
Is it possible to export parameter data from a parameterized object without including the name?
From one of
obj1.param.values()
obj1.param.serialize_parameters()
Currently using:
without_name = lambda d: {key:d[key] for key in d if key!='name'}
data = without_name(obj1.param.values())
Actually, this is kind of cool, just added a .values()
method to the parameterized class.
import param as pm
class MyCoolClass(pm.Parameterized):
p = pm.String("Hello")
def values(self):
without_name = lambda d: {key:d[key] for key in d if key!='name'}
return without_name(self.param.values())