|
From: Ype K. <yk...@xs...> - 2001-07-23 21:05:55
|
Finn,
>[Ype Kingma]
>
>>I solved the problem by removing all the $py.class files.
>
>Good.
>
>>After that I also noticed that 21a2 will not import *.PY modules (with
>>uppercase extension), so I had to change these to lower case.
>>Now 21a2 works beautifully.
>
>I think that is a bug. At least CPython only checks the case for the
>name part of the file. It doesn't check for the case of the extensions
>and I don't think Jython should either. I have comitted in a fix for it.
Having grown up in Unix I might tend to disagree about this being
a bug, but it is definitely not a language issue, so I'll end that rant.
I have to say, though, that allowing upper case it is consistent with
the python property of adapting to any environment.
>Thanks for reporting this.
My pleasure, especially after the fix. Here is some more:
A while ago (21a1, 1.1.8, OS2) I noticed that after a succesful:
execfile('e:\\someDir\\packag/modul.py')
the following failed:
from packag import modul
even though someDir is on sys.path.
However, the import would succeed after:
execfile('e:\\someDir\\package\\modul.py')
(Note the backslash before modul.py)
I used this to test modul.py before importing it.
I thought this was somewhat weird because of the existence
of os.abspath() (name ok?) that provides a 'normalized'
form of any full file name.
If you want this behavior confirmed in 21a2 just
let me know. This one is so easy to work around that
I did not bother reporting it as a bug at the time.
Regards,
Ype
|