[Zope] periods in objects - like picture.jpg

Chris Withers chrisw@nipltd.com
Wed, 15 May 2002 09:20:22 +0100


John Schinnerer wrote:
> 
> Aloha,
> 
> Not an answer, but a similar question - in general how does zope ID,
> such as (in my case) image files with IDs like picture.jpg, logo.gif,
> etc.?
> 
> I have been trying to access image size attributes of image objects,
> but it appears that zope has some kind of problem accessing an
> attribute of an object with a dot in the object name,  e.g.
> picture.jpg, whether in dtml or python script...??

funny, <dtml-var picture.jpg> works fine for me.

In python:

getattr(your_container,'picture.jpg').title
...with give you the title of the image.

cheers,

Chris

PS: Learn ZPT, save yourself pain and suffering ;-)