Cyril Elkaim wrote:
>
> for item in container.objectItems():
> if string.strip(item[0]) == image:
> image_width = int(item[1].getProperty("width"))
> image_height = int(item[1].getProperty("height"))
Also, a stylistic point:
In Python, you can use something called "tuple unpacking" or "list
unpacking" that can often help to make your code clearer if you find
yourself referencing the elements of a tuple by index.
Thus, you can rewrite your code, quoted above, as below:
for name,object in container.objectItems():
if string.strip(name) == image:
image_width = int(object.getProperty("width"))
image_height = int(object.getProperty("height"))
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )