Nested/Sub Extensions in Python

H Linux hartwig.linux at gmail.com
Sun Jul 3 05:57:40 EDT 2011


On Jul 2, 10:43 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
> I got and built the package, and it imported smt.bar just fine for me.
>
> So my advice would be to rename all the modules.  My guess is that there is a conflict for smt and Python is importing some other module or package.  Is there a file called smt.py in your working directory? ...(snip)...
> And if that is the problem, in the future be more careful to keep your module namespace clean.

Thanks a lot for your effort, those suggestions pointed me to the
solution, even if my mistake was actually a bit different. The name of
the module (abbreviated "Simple Test Module" => smt), which was just
chosen for a minimal reproducible version, was not the culprit: I
unfortunately tested in the directory where I previously built/
installed the module. Result: python picked up my local "smt"
directory (see tree output in first post) instead of that from the
installed module :-(. Hence, even a more unique module name would not
have saved me.

Anyway, problem finally solved and learned a bit more about the
pitfalls of python, thanks again to your help, your efforts are
greatly appreciated,
Hartwig




More information about the Python-list mailing list