Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6839097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:40:39+00:00 2026-05-26T23:40:39+00:00

as the title says, I am confused about sub-subpackages. My package structure is the

  • 0

as the title says, I am confused about sub-subpackages. My package structure is the following:

draw \
    __init__.py

    base \
        __init__.py
        utils.py
        events.py
        master.py
        basegui.py

Now, the first line of draw.base.events is the following:

import draw.base.utils as _utils

And the first line of draw.base is:

from draw.base.events import Event, RenderEvent, InputEvent, MouseEvent, KeyboardEvent

Just checking 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 whats the issue ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:40:39+00:00Added an answer on May 26, 2026 at 11:40 pm

    In order to import draw.base.utils in draw.base.events Python needs to import draw.base which is being imported now so there is no draw.base yet. You can replace import draw.base.utils with import utils (you can also use something like from ..base import utils in 2.7, 3.x or with from __future__ import absolute_import) in draw.base.events to break the circle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm confused on how to do what the title says. Basically I have two
The title says everything. I am talking about C/C++ specifically, because both consider this
As title says i have some problems with IE8 and Javascript. It's known about
Title says all. Sample code: ArrayList<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>(); HashMap<String, Object>
As title says, I have a list of words, Like stopWords = [the, and,
As title says, i know that new throws an exception which can be caught,
As title says. I want to perform and order by on a list -
As title says for some purpose I need to get the size of request/response
As title says, I have access to the current listitem - and it's easy
The title says it mostly. If I have an object in Python and want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.