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
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()
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