How to get the filename in the right case ?

Stef Mientki stef.mientki at gmail.com
Thu Sep 25 06:36:12 EDT 2008


hello,

How can I find the correct case of a filename ?

Background in my program I use case sensitive filenames, just like 
Python requires.
Now I've integrated pdb into the program,
but pdb acts somwhat strange:
upon a breakpoint it gives the filename always in lowercase (probably 
this only happens on windows).

So is there a way to get the correct case of a given filename in lowercase ?

One solution might be to make the comparison in my program always with 
lowercase,
but then I'm sure the program won't work on non-windows systems.

btw, why does pdb behave that way ( Python 2.5 ) ?

thanks,
Stef Mientki



More information about the Python-list mailing list