[Zope] sort in python script dynamically?

Jaroslav Lukesh lukesh at seznam.cz
Thu Jan 8 10:56:29 EST 2004


Dear all,

I have python script that does

for i in self.objectItems('Folder')


I want to sort by value of i[0] before "i" is taken to FOR. So it is 
possible to do something like


for i in self.objectItems('Folder').sort(i[0])

???


I want to sort by id value, which is in thos case value of i[0]


Under Zope DTML it is very easy:

     <dtml-in "objectItems('Folder')" sort=id>

But under python?

Many thanks,

J. Lukesh




More information about the Zope mailing list