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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -