I'm using Python 3 with Django and I try to make cross imports which fails and I don't know why... Here is the structure:
|--my_project
|-- system
|--__init__.py
|-- a.py
|-- b.py
a.py
from .b import TestB
class TestA(object):
pass
b.py
from .a import TestA
class TestB(object):
pass
The import in a.py works. But the one in b.py doesn't work: ImportError: cannot import name 'TestA'
. I also tried using absolute path (from myproject.system.a import TestA
but with no luck).
Any idea about the problem?