Package name with '.' in them: Python Bug ?

Stewart Midwinter stewart at
Fri Mar 19 22:07:49 CET 2004

Yannick Patois <patois at> wrote in message news:<c3f1ac$n29$1 at>...
> If now I just *rename* file B to B.1, without any change in the code 
> (except name='B' become name='B.1' in, content of file 
> being exacty the same as content of, I get:

> Any idea ? Is it well a bug ? Some feature I didnt understood ? I read 
> about submodule naminig using dots as separator, but I cant relate it 
> towhat I saw here.

Salut Yannick:

J'ose offrir une réponse....

I work with submodules.  They're in some folder, which has subfolders
(call them fbm, uti, and a few others).  If I place an empty file in
my root folder called, I can refer to modules in the
subfolders by a dot notation.  For example, if I have a file in subfolder fbm, I can say:
import fbm.process

I speculate that when you renamed B to B.1, Python interpreted your
intent to import a module called 1 in subfolder B.

J'espère que cela aide un peu!


More information about the Python-list mailing list