[Zope] Sorting objectValues in Python Script

Andreas Tille tillea@rki.de
Fri, 18 Oct 2002 10:15:10 +0200 (CEST)


Hello,

I just want to build a sorted list of

   list = context.objectValues('ExtFile')
   for file in list:
        print file.id, file.title
   return printed

or in other words just the equivalent to the following dtml-code

<dtml-in expr="objectValues('ExtFile')" sort="id" reverse>
 <dtml-var id> <dtml-var title>
</dtml-in>

Any idea to perform this.

Kind regards

         Andreas.