Add case checking feature on import.

This is an option for OS-es with case-insensitive but case-preserving
filesystems.  It is currently supported for Win32 and MacOS.  To
enable it, #define CHECK_IMPORT_CASE in your platform specific
config.h.  It is enabled by default on those systems where it is
supported.  On Win32, it can be disabled at runtime by setting the
environment variable PYTHONCASEOK (to any value).

When enabled, the feature checks that the case of the requested module
name matches that of the filename found in the filesystem, and raises
a NameError exception when they don't match.
1 file changed