Message28853
Logged In: YES
user_id=1326842
I think this is a usage error. The problem is that
you run moduleX as a script. This puts the module's
directory as the first entry in sys.path (see
http://docs.python.org/dev/lib/module-sys.html#l2h-5058
for detais).
As a consequence, moduleX is recognised as a top
level module, not as part of a package.
If you want to test relative import, try opening an
interactive shell in the directory where `package`
resides, and type:
>>> from package.subpackage1 import moduleX
>>> moduleX.spam
'spam'
|
|
Date |
User |
Action |
Args |
2007-08-23 14:40:44 | admin | link | issue1510172 messages |
2007-08-23 14:40:44 | admin | create | |
|