Message235761
That's the situation:
a/
__init__.py
first.py
second.py
#init.py
__all__ = ['second', 'first']
print('i\'m starting the directory')
#first.py
print('hi, i\'m the first')
from . import *
#second.py
print('hi, i\'m the second')
From the interactive prompt:
>>> import a.first
i'm starting the directory
hi, i'm the first
hi, i'm the second
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/antox/Scrivania/a/first.py", line 2, in <module>
from . import *
AttributeError: module 'a' has no attribute 'first'
It's pretty weird. |
|
Date |
User |
Action |
Args |
2015-02-11 18:38:45 | antox | set | recipients:
+ antox |
2015-02-11 18:38:45 | antox | set | messageid: <1423679925.56.0.995999383567.issue23447@psf.upfronthosting.co.za> |
2015-02-11 18:38:45 | antox | link | issue23447 messages |
2015-02-11 18:38:45 | antox | create | |
|