[Zope-dev] getattr in a PythonMethod

Kevin Dangoor kid@kendermedia.com
Wed, 23 Feb 2000 18:37:15 -0500


----- Original Message -----
From: "Kevin Littlejohn" <darius@connect.com.au>
To: "Kevin Dangoor" <kid@kendermedia.com>
Cc: <zope-dev@zope.org>
Sent: Wednesday, February 23, 2000 6:29 PM
Subject: Re: [Zope-dev] getattr in a PythonMethod


> (Noting you can already do the same thing with self['x_db'[1:]] anyway,
but
> it's assumed nothing valuable lives there ;)

Interesting... there's the answer to my question.

dtml = self['popular.html']

does just what I need :)

Kevin

>
> >>> "Kevin Dangoor" wrote
> > I'm running Zope 2.1.4 and PythonMethod 0.1.7, and I'm running into an
> > AttributeError for "validate" when I do:
> >
> > dtml = getattr(self, 'popular.html')
> >
> > I don't know of another way to get at "popular.html" from python. This
line
> > is definitely the issue though...
> >
> > The method is called with self, REQUEST as parameters.