I'm having a problem with importing files which can be simplified as this:
a.py:
import b
a = 0
b.foo()
b.py:
import a
def foo():
a.a=4
So, what I'm trying to do is: in file a.py call the function foo() from b.py which would then change the value of a variable that is in a.py. This is the error I get:
AttributeError: module 'b' has no attribute 'foo'
What am I doing wrong? What would be the proper way to do this?