Python Import Statement and Recursion- need function available in module namespace -
i have function foo() in main.py. in main.py, import create.py. there function in create.py needs foo() main. can't import main.py create.py because main.py errors out...i assume kind of race condition.
how can make foo() available in create.py namespace? seems kind of inefficient make foo() module , imported both main.py , create.py 1 function.
the easy answer move foo() foo.py , import there or move create.py , import there main.py - if there things in main.py needs move too. other option pass foo main create function parameter needed.
Comments
Post a Comment