Re: Specify the sorting direction for the various columns/

2009-06-14 Thread Oni
Thanks for the answers. My goal was to try to avoid hard coding and add a little shine to the code I have inherited. But its too far gone already and time is short. So have used Mike's answer. Mike answer with minor changes: import datetime import pprint import operator import time entries = [{

Re: Specify the sorting direction for the various columns/

2009-06-11 Thread Mike Kazantsev
On Thu, 11 Jun 2009 18:54:56 -0700 (PDT) Oni wrote: > Managed to get a dictionary to sort on multiple columns using a tuple > to set the sort order (see below). However how can I control that > column "date" orders descending and the column "name" orders > ascending. ... > bob = entries > bob.sor

Re: Specify the sorting direction for the various columns/

2009-06-11 Thread Mark Tolonen
"Oni" wrote in message news:018f4fa2-7203-4c98-a313-da5584976...@z20g2000prh.googlegroups.com... Managed to get a dictionary to sort on multiple columns using a tuple to set the sort order (see below). However how can I control that column "date" orders descending and the column "name" orders