Packages, modules, libraries,...

Adrian Eyre a.eyre at
Tue Feb 1 09:43:37 EST 2000

> Just to be sure: I guess I have to import cafe before I can import 
> cafe.bacon.

No, but be aware that importing cafe.bacon will implicitly import
the cafe package first, so any code in will get executed

> Are there any special demands on cafe/ compared to
> ordinary modules?

Not as far as I am aware. Bear in mind that any symbols exported in
the file will be put in the cafe namespace, so be cafeful
not to use the same names as any modules in the cafe package.

Oh. One more thing I forgot to mention. A package has an additional
attribute called "__path__" which is the full path that the
file is in.

Adrian Eyre <a.eyre at> - 

More information about the Python-list mailing list