[Zope] sorting ids in python

Andreas Jung lists at zopyx.com
Mon Dec 8 14:30:03 EST 2008


On 08.12.2008 19:23 Uhr, Andreas Jung wrote:
> On 08.12.2008 18:18 Uhr, Garry Saddington wrote:
>> Can anyone help me sort the following by id in a python script?
>>
>> for object in context.objectValues(['Folder', 'DTML
>> Document','ZipFolder','File','Image']):
>>
>>
>
> ids = context.objectIds()

Possibly you need

ids = list(context.objectIds())

-aj

> ids.sort()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20081208/88940f9f/attachment.vcf 


More information about the Zope mailing list