Import removing first module component

koblas koblas at gmail.com
Thu Jun 5 11:44:18 EDT 2008


On Jun 4, 2:48 pm, "David C. Ullrich" <dullr... at sprynet.com> wrote:
> In article
> <75481b47-87ec-4a84-8063-7abbdb286... at u6g2000prc.googlegroups.com>,
>
>  koblas <kob... at gmail.com> wrote:
> > Have the following line:
> >         import notewave.runner.LMTP
>
> > Yeilding the following error:
> >         ImportError: No module named runner.LMTP
>
> > For the life of me I don't understand why the first component
> > "notewave" is being stripped off, when the import is happening.
>
> Does notewave contain a _module_ named runner.LMTP ?
> Probably not, since the error message says there's no
> such module.
>
> > Thanks,
>
> --
> David C. Ullrich

The following exist:
   .../notewave/runner/LMTP.py
inside of LMTP.py there is:
   class LMTPRunner(Runner) :

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.



More information about the Python-list mailing list