I've got the following code (shortened for clarity):
face.py:
from frame import *
class Face(Frame):
def hello(self):
print 'hello'
frame.py:
from face import *
class Frame(object):
def __init__(self, image):
self.image = image
I'm getting the following error:
Traceback (most recent call last):
File "2.py", line 2, in <module>
from frame import *
File "/home/code/iris/frame.py", line 4, in <module>
from face import *
File "/home/code/iris/face.py", line 7, in <module>
class Face(frame.Frame):
NameError: name 'frame' is not defined
which I think is to do with the way I've either:
- Set up my 'imports'
- Set up my classes
Any ideas what I've done wrong? Also, if anyone can explain where 'import' is necessary that would be helpful!
Thanks! Chris.