def from_file(self, filename):
        config_mod = imp.new_module('config')
        execfile(filename, config_mod.__dict__)
        return self.from_object(config_mod)
Load settings from a Python file
dataset/ETHPy150Open openelections/openelections-core/openelex/config.py/Settings.from_file