Strange import bug

Colin Brown cbrown at
Tue Nov 25 01:22:39 CET 2003

"Adeodato Simó" <asp16 at> wrote in message
news:mailman.1046.1069718245.702.python-list at
It doesen't try to import the current directory as a module. If first
looks *inside* the current directory for a module named abc (which can
be a directory named abc with a file inside OR an
file OR an abc.pyc compiled file). So it finds abc, which is a dir but
also a *module* because of the file, and imports it.

Ahh! I see. When "import abc" produces nothing I have to do:

>>> import abc
this is abc

Thanks, now I can get on with the original problem I had.


More information about the Python-list mailing list