[Zope] Python Script Question

Terry Hancock hancock at anansispaceworks.com
Fri May 14 22:45:51 EDT 2004

One more case -- count everything that is *not* of a given meta type.
(e.g. exclude ALL python scripts and all external methods, but count
everything else):

forbidden = ('Script (Python)', 'External Method')
items = context.objectValues()
i = 0
for item in items:
    if item.meta_type not in forbidden: i += 1
return i

This is a little tricky, because it assumes you know that ALL other
types should be counted.  Which may not be what's intended, if,
for example, an alternative scripting object is added. (???)

But you get the idea.


Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com

More information about the Zope mailing list