Zope external methods and Python: Access to object with a dot in the name

Oleg Broytmann phd at phd.pp.ru
Thu Jan 3 08:31:38 EST 2002


On Thu, Jan 03, 2002 at 05:15:20AM -0800, Guillaume SAUZON wrote:
> |-images
>     |
>     |-hello.jpg
>     |-other.jpg
> 
> So, if I try to access the hello.jpg image, to get the height, I will
> type something like:
> size = self.images.hello.jpg.height

   size = getattr(self, "hello.jpg").height

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list