[Zope] Sorting of objectValues within python script

Michael Murphy Michael Murphy" <mike@flipper.eskimo.net
Tue, 2 Oct 2001 08:01:02 -0700


How about:

sorted_list = list.sort(lambda x, y: cmp(x.getId(), y.getId())

Where list is your list of objectValues.

Mike

----- Original Message -----
From: <olpa@sybcom.de>
To: <zope@zope.org>
Sent: Tuesday, October 02, 2001 6:36 AM
Subject: [Zope] Sorting of objectValues within python script


>
> Hi, one question again that I could not find neither in the mailing list
> nor in the ZopeBook:
>
> I have a list of ZODB objects, collected by using objectValues.
>
> How can I sort this list by the id? is this SortEx? how can I access
> SortEx? from within python script?
>
> ---
>    I think we dream so we don't have to be apart so long. If we're in each
> other's dreams, we can play together all night.   -- Calvin
> ---
>  Oliver Pabst             .-------------------------.
>  mailto:olpa@sybcom.de    :                         :
>  phone :+49 681 56600600  :    project department   :          SYBCOM GmbH
>  fax   :+49 681 56600660  :                         : http://www.sybcom.de
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>