sorting a shelve

Anders Eriksson ame at swipnet.se
Wed Mar 8 17:36:14 EST 2000


Hello!
I'm thinking of creating a simple addressbook and using a shelve as
the 'database'. Say I use the email address as the key and then as the
value I have a list of all the things I want to save about this
person, like first and last name, phone, fax, address, city, etc.

Now I I know the email address then it's very easy to find the rest of
the info and if I know the first name then I could just loop until I
found it... but if I want to create a print out sorted by last name
and only thos that live in London; how do I go about?

// Anders







More information about the Python-list mailing list