[Python-Dev] Easy way to detect filesystem case-sensitivity?

Oleg Broytmann phd at phd.pp.ru
Fri May 8 19:17:15 CEST 2009


On Fri, May 08, 2009 at 09:52:40AM -0700, Brett Cannon wrote:
> Thanks for the help to everyone. I ended up simply taking __file__, making
> it all uppercase (or lowercase if it is already uppercase) and then doing
> os.path.exists() on the modified name. Seems to work.

   What if __file__ is on a different filesystem with different rules
(consider NFS, SMB/CIFS, etc.)?

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list