[Python-Dev] Case sensitive import.

Steven D. Majewski sdm7g@virginia.edu
Mon, 5 Feb 2001 17:19:02 -0500 (EST)


On Sun, 4 Feb 2001, Tim Peters wrote:

> Well, MacOSX-on-non-HFS+ *is* Unix, right?  So that should take care of
> itself (ya, right).  I don't understand what Cygwin does; here from a Cygwin
> bash shell session:
> 
> tim@fluffy ~
> $ touch abc
> 
> tim@fluffy  ~
> $ touch ABC
> 
> tim@fluffy ~
> $ ls
> abc
> 
> tim@fluffy ~
> $ wc AbC
>       0       0       0 AbC
> 
> tim@fluffy ~
> $ ls A*
> ls: A*: No such file or directory
> 
> tim@fluffy ~
> 
> So best I can tell, they're like Steven:  working with a case-insensitive
> filesystem but trying to make Python insist that it's not, and what basic
> tools there do about case is seemingly random (wc doesn't care, shell
> expansion does, touch doesn't, rm doesn't (not shown) -- maybe it's just
> shell expansion that's trying to pretend this is Unix?  oh ya, shell
> expansion and Python import -- *that's* a natural pair <wink>).
> 

Just for the record, I get exactly the same results on macosx
as you did on Cygwin. 

The logic behind the seemingly random results is, I'm sure, the
same logic behind my patch: accessing the file itself is case
insensitive; but the directory entry (accessed by shell globbing)
is case preserving. 


-- Steve Majewski