as the name says, I'm confused about sub-subpackages. My package structure is as follows:
draw \ __init__.py base \ __init__.py utils.py events.py master.py basegui.py
Now the first line of draw.base.events
follows:
import draw.base.utils as _utils
And the first line of draw.base
:
from draw.base.events import Event, RenderEvent, InputEvent, MouseEvent, KeyboardEvent
Just check the code for SyntaxErrors with IDLE:
import draw.base as base
gives the following AttributeError
:
Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import draw.base File "Z:\Eigene Dateien\Eigene Dokumente\Python\draw\base\__init__.py", line 4, in <module> import draw.base.events as events File "Z:\Eigene Dateien\Eigene Dokumente\Python\draw\base\events.py", line 10, in <module> import draw.base.utils as _utils AttributeError: 'module' object has no attribute 'base'
Can someone explain to me what the problem is?
source share