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 8581935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:10:12+00:00 2026-06-11T21:10:12+00:00

I am new to python. I got Syntax Error: invalid syntax & object module

  • 0

I am new to python. I got Syntax Error: invalid syntax & object module is not callable

Thanks for your help

Spot.py

class Spot(object):
    isBunny = bool()
    UP = 0
    SLEEP = 2

    def __init__(self, newIsBunny):
        self.isBunny = newIsBunny
        self.nextCycle = self.UP

Test.py

import Spot
i=2
if i==Spot.SLEEP
    a=Spot(True)
print a.isBunny
  • 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-06-11T21:10:13+00:00Added an answer on June 11, 2026 at 9:10 pm

    In addition to what Borgleader says, instead of

    import Spot
    

    use

    from Spot import Spot
    

    This should fix the “module is not callable” error.

    When you say

    import Spot
    

    then “Spot” is the whole module. Spot.Spot is the Spot class inside the Spot module, which is what you really want. Using the from Spot import Spot syntax lets you pull in just the Spot class from the Spot module, and call it Spot.

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

Sidebar

Related Questions

I am brand new to python. I got a error while not cls.isFilled(row,col,myMap): TypeError:
I'm new to python and may not be very familiar with the detailed syntax
I am brand new to python, and I need some help with the syntax
hi i am new to python and i got this error but i have
I am new to Python and while unit testing some methods on my object
I'm new in python programming. just got stuck with this one problem. I have
I'm new to python and is trying to install the pyimage module. http://code.google.com/p/pyimage/ I'm
I'm fairly new to Python. In programming a lot of PHP recently I got
Python is new for me, and I've got problems to organize my files codes.
When I try to to use new Aggregate framework from Python I got the

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.