import symbols import sys #loop through all imported modules for m in sys.modules: if m == "symbols": sys.modules[m].check() break