How to get the filename in the right case ?
OKB (not okblacke)
brenNOSPAMbarn at NObrenSPAMbarn.net
Thu Sep 25 17:42:45 CEST 2008
Stef Mientki wrote:
> >>> import Module1
> > d:\data_python_25\pylab_works\module1.py(3)<module>()
> -> print "hello"
>> Then we know if PDB is really the culprit.
> So pdb is the problem.
Yep, it does the same thing for me.
>> Apart from that, is that really a problem that the filenames are
>> all lower case? AFAIK Windows is case-insensitive regarding
>> filenames anyway. So opening the file by just passing the filename
>> should work seamless.
> Yes windows is,
> but Python is not.
> My program should run on Windows and Linux (and maybe a few
> others). By converting everything to lowercase, on Linux I can't
> distinguishes between 2 files with the same name but a different
> case (btw, giving 2 files the same name, only differing in case,
> looks like a bad idea to me).
Hmmm, but I don't understand what you're doing here. Are you
somehow storing the filename that pdb outputs and you need to use it
later on a potentially different OS? If the case is preserved in pdb on
linux, then presumably running it on linux will be fine, right? It's
only a problem if you somehow try to use a filename created by windows-
pdb to open a file (the same file, somehow) on linux.
--OKB (not okblacke)
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
More information about the Python-list