module and namespace

Egon Frerich egon at frerich.eu
Fri Apr 18 03:34:50 EDT 2014


I have a problem with a namespace. There is a module mptt (actally from
Django). If I import this module with the interpreter it tells me the
namespace:

Python 3.3.5 (default, Apr 12 2014, 23:34:20)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mptt
>>> print(mptt)
<module 'mptt' from './mptt/__init__.py'>
>>>

If I import mptt in my program then there is no ImportError but the
namespace is broken:

<module 'mptt' (namespace)>

(This is the output with print after the import).

What is the meaning? When does this happened?

Egon

























More information about the Python-list mailing list