[Freevo-devel] Re: [Freevo-cvslog] r7768 - in trunk/ui/src: . util

2005-10-28 Thread Dirk Meyer
Jason Tackaberry wrote: > On Thu, 2005-10-27 at 19:57 +0200, Dirk Meyer wrote: >> +def smartsort(x,y): >> +""" >> +Compares strings after stripping off 'The' and 'A' to be 'smarter' >> +Also obviously ignores the full path when looking for 'The' and 'A' >> +""" >> +m = os.path.b

Re: [Freevo-devel] Re: [Freevo-cvslog] r7768 - in trunk/ui/src: . util

2005-10-27 Thread Jason Tackaberry
On Thu, 2005-10-27 at 19:18 -0400, Jason Tackaberry wrote: > return cmp(m.lower(), n.lower()) # use lower(), faster Just to qualify this, this assumes the input is mostly lowercase, which is the case for most of the systems I've seen. OTOH if the input was mostly uppercase, then upper()

[Freevo-devel] Re: [Freevo-cvslog] r7768 - in trunk/ui/src: . util

2005-10-27 Thread Jason Tackaberry
On Thu, 2005-10-27 at 19:57 +0200, Dirk Meyer wrote: > +def smartsort(x,y): > +""" > +Compares strings after stripping off 'The' and 'A' to be 'smarter' > +Also obviously ignores the full path when looking for 'The' and 'A' > +""" > +m = os.path.basename(x) > +n = os.path.ba