[Python-Dev] Case sensitive import on windows

Thomas Heller thomas.heller@ion-tof.com
Wed, 18 Apr 2001 17:49:55 +0200


I tried to find out what had changed between 2.0 and 2.1.
Consider the following files in the current directory:

Spam.py
spam/__init__.py

Using python 2.0:

Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import Spam
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: Case mismatch for module name Spam
(filename spam)
>>> import spam; print spam
<module 'spam' from 'spam\__init__.py'>
>>>

Using python 2.1:

Python 2.1c2 (#14, Apr 15 2001, 21:29:05) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import Spam
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
SystemError: NULL result without error in call_object
>>> import spam; print spam
<module 'spam' from 'spam\__init__.py'>
>>>

Seems like a bug to me...

Thomas