Following structure:
app.py
/package
__init__.py
foo.py
bar.py
"foo.py" and "bar.py" contains both classes "Foo" and "Bar". Class "Foo" inherits from class "Bar". We have following code in the files...
"app.py":
from package import Foo
print Foo()
"__init__.py":
from foo import Foo
from bar import Bar
"foo.py":
class Foo(Bar):
pass
"bar.py":
class Bar:
pass
If I create an instance from "Foo" I became an name error "name 'Bar' is not defined". What I have to do to make it work? I am using Python 2.6.6 if it matters...
.oO(I'm new to Python)
from bar import Barto foo.py?