[Zope] Newbe external method question

Chris Withers chrisw@nipltd.com
Tue, 01 Aug 2000 14:22:56 +0100


"Gaspard, Bradley S" wrote:
> I want to write an external method that first determines all of the objects
> in a folder that posses a certain property.
> I know how to find the object ids but once I do that how do I then determine
> which contain the property I am searching for??

def myfilter(folder,propertyname):
	return filter(lambda x:
x.hasProperty(propertyname),folder.objectValues())

This wil return a python list of the objects that have the property you
are looking for...

HTH,

Chris