def init(fn=None, config={}):
'''
Will initialize the Config object with a given config, if
given one. Otherwise it will default to just the default
configuration file.
Will try to load the defaultly named config file if it exists.
Otherwise, it will merely have the default configurations.
'''
# load the file from memory or default
Config.is_initialized = True
if fn:
Config.config_fn = os.path.join(sublime.installed_packages_path(),
Config.package_dir, fn)
# Config.config_fn = os.path.abspath(Config.config_fn)
Config._load_config()
# load param config file into our config
for k in config:
Config.config[k] = config[k]
Config._save_config()
评论列表
文章目录