It's a game I'm making. Don't see the problems myself though.
Here's the error and the two .py files:
C:\Users\Rickard\My Programs\Python\slutarbete\New try>main.py
Traceback (most recent call last):
File "C:\Users\Rickard\My Programs\Python\slutarbete\New try\main.py", line 6,
in <module>
from rabbits import Rabbit
File "C:\Users\Rickard\My Programs\Python\slutarbete\New try\rabbits.py", line
3, in <module>
import main
File "C:\Users\Rickard\My Programs\Python\slutarbete\New try\main.py", line 6,
in <module>
from rabbits import Rabbit
ImportError: cannot import name Rabbit
main.py
# -*- coding: utf-8 -*-
import pygame, sys, random, math
from rabbits import Rabbit
from pigs import Pig
from boars import Boar
from pygame.locals import *
from threading import Timer
pygame.init()
pygame.mixer.init()
mainClock = pygame.time.Clock()
WINDOW_WIDTH = 640
WINDOW_HEIGHT = 400
level = 1
while True:
...
And the rabbits.py file:
# -*- coding: utf-8 -*-
import pygame, sys, random, math
import main
class Rabbit(object):
rabbitCounter = 0
NEW_RABBIT = 40
RABBIT_SIZE = 64
...
I sure can use some help with other obvious errors in this code.