[Zope] Getting an object indirectly in a PythonMethod

Hannu Krosing hannu@tm.ee
Thu, 04 Nov 1999 09:58:42 +0000


"Jay, Dylan" wrote:
> 
> I have a python method as part of a ZClass. I want this method to return an
> object whose id is stored in a ZClass property. In DTML this would be as
> simple as <dtml-return "_[ObjNameProperty]">
> I can't figure out how to do this in a python method. Things such as
> self.getattr(ObjNameProperty) don't seem to work at all.

try getattr(self,ObjNameProperty) , it has workwed forr me (once ;)

------
Hannu