[IronPython] Case Sensitive Imports

Michael Foord fuzzyman at voidspace.org.uk
Fri Jan 5 15:17:08 CET 2007


Hello all,

I don't recall seeing an email about this, but that would surprise me: 
so sorry if this is a known issue. (Although I don't see it in the 
'differences' document.)

IronPython is case-insensitive with regards to imports, whereas CPython 
is not.

To reproduce, create a file in the current directory called 'fiddler.py'.

In IronPython do 'import Fiddler' and it will succeed.

If you then do 'Fiddler.__file__' it reports that the filename has an 
uppercase 'F' !

This is quite a change in import semantics and will bite if you have 
files with similar names in different places on 'sys.path'.

Michael Foord
http://www.voidspace.org.uk/ironpython/index.shtml



More information about the Ironpython-users mailing list