I got a weird problem that I wasn't been able to find answer all over the internet (or I don't know how to ask).
I have module AAA.py
from BBB import BBB
class AAA():
def test(self):
print 'AAAA'
a = BBB()
and module BBB.py
class BBB():
def __init__(self):
print 'BBB'
then when I call
a = AAA()
a.test()
everything works as expected and I see output
AAAA
BBB
BUT when I try to import and use class AAA from module BBB.py
from AAA import AAA
class BBB():
def __init__(self):
print 'BBB'
I get following error
ImportError: cannot import name AAA
Any suggestions? I cant create circular dependencies in Python? I am using version Python 2.7.6 on Ubuntu