http://d.hatena.ne.jp/machua/20101026/1288099599
Occurs when calling modules to each other with the following module structure.
file organization
view\
__init__.py
form1.py
form2.py
form1.py
from veiw.fom2 import frm2
class frm1 ():
....
form2.py
from veiw.fom1 import frm1
class frm2 ():
....
At the time of import, I am getting an error because I am importing myself (I think) By the way, it also occurs when you create a module with the same name as the built-in module.
Instead of importing globally, import within the class. For example, in the constructor or in the function just before calling the screen.
form1.py
class frm1 ():
def __init__(self):
from veiw.fom2 import frm2
self.fm = frm2()
Recommended Posts