Sorting dictionary by 'sub' value
From: Rory Campbell-Lange (rory_at_campbell-lange.net)
Date: 03/08/05
- Next message: timothy.williams_at_nvl.army.mil: "Re: Accessing files installed with distutils"
- Previous message: Thomas Rademacher: "determine directories with wildcard"
- Next in thread: Diez B. Roggisch: "Re: Sorting dictionary by 'sub' value"
- Reply: Diez B. Roggisch: "Re: Sorting dictionary by 'sub' value"
- Maybe reply: Rory Campbell-Lange: "Re: Sorting dictionary by 'sub' value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 8 Mar 2005 13:28:00 +0000 To: python-list@python.org
I have a dictionary of images. I wish to sort the dictionary 'v' by a
dictionary value using python 2.3. The dictionary value is the date
attribute as shown here:
v[imagename][9]['date']
This attribute is an extracted EXIF value from the following set:
data element [9] of v[imagename]:
{'now' : datetime.date(2005, 3, 7),
'y' : (0x011B) Ratio=72 @ 182,
'ctime' : datetime.date(2005, 3, 7),
'width' : (0xA002) Long=1024 @ 434,
'length' : (0xA003) Long=768 @ 446,
'date' : (0x9004) ASCII=2004:12:07 00:18:20 @ 514,
'x' : (0x011A) Ratio=72 @ 174,
'model' : (0x0110) ASCII=PENTAX Optio 330 @ 156,
'size' : 367415L,
'orientation' : (0x0112) Short=1 @ 42}
Thanks,
Rory
-- Rory Campbell-Lange <rory@campbell-lange.net> <www.campbell-lange.net>
- Next message: timothy.williams_at_nvl.army.mil: "Re: Accessing files installed with distutils"
- Previous message: Thomas Rademacher: "determine directories with wildcard"
- Next in thread: Diez B. Roggisch: "Re: Sorting dictionary by 'sub' value"
- Reply: Diez B. Roggisch: "Re: Sorting dictionary by 'sub' value"
- Maybe reply: Rory Campbell-Lange: "Re: Sorting dictionary by 'sub' value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|