--On 29. September 2006 09:00:16 +0200 Daniel de la Cuesta <[EMAIL PROTECTED]> wrote:

Hi, I am beginner working with Zope. I like it but I have some doubts:

I have an structure with folders and subfoulders, each folder and
subfolder has items.

I want to go round this structre with a Python based script, to know the
number of elements i do the following:

path="animals"
items=len(context.sections.path.contentValues())


When I try to run the script I get an error saying that the variable
"path" is not present.

'path'? What should that be? Where should this come from? Since you're
using CMF/Plone you might perform a *more efficient* catalog search.
At least don't use contentValues() - except necessary - since it load
*all* objects from the ZODB into memory.

-aj

Attachment: pgpyZdQdYyKkw.pgp
Description: PGP signature

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to