You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
243 B
Python

import ruamel.yaml
def load_config(path):
with open(path, 'r') as fp:
return ruamel.yaml.round_trip_load(fp.read())
def save_config(config, path):
with open(path, 'w') as fp:
ruamel.yaml.round_trip_dump(config, fp)