def get_settings_from_file(path, default_settings=DEFAULT_CONFIG):
 (name, ext) = os.path.splitext(os.path.basename(path))
 module = load_source(name, path)
 return get_settings_from_module(module, default_settings=default_settings)

def get_settings_from_file ( path , default_settings = DEFAULT_CONFIG ) : ( name , ext ) = os . path . splitext ( os . path . basename ( path ) ) module = load_source ( name , path ) return get_settings_from_module ( module , default_settings = default_settings )
loads settings from a file path .