> Eval.py is imported in main.py, but I've a loop > in eval.py that must call a function in main.py... The obvious solution is to move that function into another module, which you import in both main.py and eval.py. Not knowing the details, this might not suit to your case...