(Serious?) package namespace problem (and a proposal)
Justin Sheehy
dworkin at ccs.neu.edu
Wed Jun 28 23:58:49 EDT 2000
hzhu at knowledgetrack.com (Huaiyu Zhu) writes:
> What it hurts is to import BBB/AAA.py instead of AAA.py. I'd be interested
> in how do you "Don't do it".
My apologies. I saw that you were doing something messy, and ended up
with a mess. I responded without looking any deeper than that.
It seems that you're being bitten by two things.
One of them is case-insensitivity, which is broken but unavoidable
when on Windows.
The other is relative importing, which doesn't currently have any
user-modifiable way to specify that you really don't want to import
from the package directory.
> Now could any one that think the problem can go away suggest a solution that
> does not need to change file names and still works on Windows.
Sadly, I can't. As far as I can see, you simply have to avoid naming
submodule files after top level modules that could possibly be
imported by anything in that package. Feh.
-Justin
More information about the Python-list
mailing list