Import removing first module component
wuwei23 at gmail.com
Thu Jun 5 18:36:17 CEST 2008
On Jun 6, 1:44 am, koblas <kob... at gmail.com> wrote:
> Another person pointed out that I should check on the __init__.py and
> make sure lmtp is defined in the __all__ block. I didn't have an
> __init__.py at that level of the tree, which must have been causing
> problems, but clearly I don't understand the full inheritance of
> __init__.py and sub-directories.
If you're not sure about packages, it's covered in the python docs
An __all__ variable doesn't have to be defined, the __init__.py can be
empty, as it's the presence of that file that informs python that the
folder is a package. The example in the docs should help you here.
More information about the Python-list