The Cleanest way to use with using Python 2.7
import imp module = imp.load_source("myfile", os.path.join(latest, "myfile.py")) print(module.myvariable)