Sure this is a newbie and common error, but I could no find a solution because I don't know the name of this kind of issues.
I've got 2 python files p1.py and p2.py
p1.py:
from p2 import *
def a():
print "Caller a --> Calling b"
b()
def c():
print "Caller c --> Calling d"
d()
a()
p2.py:
from p1 import *
def b():
print "Caller b --> Calling c"
c()
def d():
print "Caller d --> END"
When I run p1.py
I get next error:
NameError: global name 'b' is not defined
What I'm doing wrong? Any recommended [short] read?