def writeCustomConfig(config, filename = "config.yaml"):
if "customConfig" in config:
if os.path.exists(filename):
# Append if it already exists
mode = "ab"
else:
mode = "wb"
# Write out configuration
with open(filename, mode) as f:
yaml.dump(config["customConfig"], f, default_flow_style = False)
评论列表
文章目录