On 8/15/07, Jeremy C B Nicoll wrote: > Marc 'BlackJack' Rintsch wrote: > > > How would I sort leaflist in a way that mimics the sort order that XP > > > shows me things under? > > > > This depends on what XP is. Which program? Which locale? How does the > > locale influence that programs sorting? > > Well... XP is Windows XP (Pro as I think I said earlier), and I'm in the UK. > I explained earlier how XP shows me stuff in order when I tell it to sort by > name.
Case insensitive sort with ~ coming before all other characters: some_list.sort(key=lambda k: k.lower().split("~")) -- http://mail.python.org/mailman/listinfo/python-list