Import on case insensitive filesystem

Mitchell Hashimoto mitchell.hashimoto at gmail.com
Fri May 13 14:43:23 EDT 2011


Hello,

I'm developing an app which runs Python on a filesystem which is not case
sensitive (Mac OS X), but is mounted as an NFS drive on a remote machine.
This causes errors because of the import being case sensitive but accessing
an FS which is case insensitive. Short of copying the entire directory tree
over to another filesystem, is there anything I can do to flag Python to act
as though it were on a case sensitive FS?

The exact issue I'm seeing is this file, named crypto.py, and relying on
pycrypto:

    from Crypto.Cipher import AES
    print("Made it!")

That attempts to import the same file (itself) instead of finding the Crypto
module since the filesystem casing is incorrect.

Any tips would be greatly appreciated.

Best,
Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110513/9d4a9c75/attachment.html>


More information about the Python-list mailing list