How to get the filename in the right case ?
stef.mientki at gmail.com
Thu Sep 25 21:38:56 CEST 2008
I found a partial workaround that is good enough for me:
def Get_Windows_Filename ( FileName ) :
if os.name == 'nt' :
File = os.path.splitext ( FileName .lower ())
return glob.glob ( File + '.p?' )
This will translate the filename into the correct case, but not the path.
I also looked at os.path.walk, but that's too slow for me,
because getting the path correct means I have to start at the root.
More information about the Python-list