Traceback oddity

Steve Holden sholden at holdenweb.com
Fri Oct 19 09:23:00 EDT 2001


"Georg Bisseling" <Georg.Bisseling at pallas.com> wrote ...
> Dale Strickland-Clark wrote:
> >   File "S:\JOBS\Gibson\Library Manager\librarymanager\cli\lb.py", line
>
> ...
>
> >   File "s:\jobs\gibson\library manager\librarymanager\lbdbTable.py",
> >
> > The observant will have noticed that the first few filepaths are in
> > mixed case whereas the last are all lower case.
> >
> > I only noticed because I'm trying to post-process this report.
> >
> > Any ideas why?
>
> Because Bill didn't get it right in the first place...
>
> The FAT12/16/32- and NT-Filesystems are not case sensitive but
> "case aware". That means you can have a file named "a" and
> a file named "A" but they are not allowed to live in the same
> directory.
>
Not, unfortunately, strictly true. Certainly in older versions on NT you
could use the Posix utilities to create two different files in the same
directory whose names were indistinguishable under NT, but which were
treated as different under Posix. Haven't tried it lately...

> If you open "a" or "A" for read you get either "a" or "A" whatever
> is there.
>
And under the circumstances described above you got whichever the filesystem
code came up against first. Wildcard matches were especially fun, since
(AFAIR) the two different names would glob out, but then both would access
the same file.

This just shows the difficulty of trying to use non-native filename
semantics on a crippled platform.

> To complicate things the newer Windows-Versions do not show the
> filenames as they are stored on disk but in a "beautified" Form.
>
> So it is safe and consistent to use lower case letters when searching
> for files to read.
>
But of course that doesn't answer Dale's question as to why his traceback
shows the same directory in different ways. Dale, have you checked to see
whether you have multiple entries in sys.path?

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list