[Python-ideas] PEP 428 - object-oriented filesystem paths

Ethan Furman ethan at stoneleaf.us
Fri Oct 12 18:12:02 CEST 2012


Greg Ewing wrote:
> Ronald Oussoren wrote:
>> neither statvs, statvfs,  nor pathconf seem to be able to tell if a 
>> filesystem is case insensitive.
> 
> Even if they could, you wouldn't be entirely out of the woods,
> because different parts of the same path can be on different
> file systems...
> 
> But how important is all this anyway? I'm trying to think of
> occasions when I've wanted to compare two entire paths for
> equality, and I can't think of *any*.

Well, while I haven't had to compare the /entire/ path, I have had to 
compare (and sort) the filename portion.  And since the SMB share uses 
lower-case, and our legacy FoxPro code writes upper-case, and files get 
copied from SMB to the local Windows drive, having the case-insensitive 
compare option in Path makes my life much easier.

~Ethan~



More information about the Python-ideas mailing list