picadae calibration programs
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819
  1. ##| Copyright: (C) 2019-2020 Kevin Larke <contact AT larke DOT org>
  2. ##| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. import yaml,types
  4. def parse_yaml_cfg( fn ):
  5. """Parse the YAML configuration file."""
  6. cfg = None
  7. with open(fn,"r") as f:
  8. cfgD = yaml.load(f, Loader=yaml.FullLoader)
  9. cfg = types.SimpleNamespace(**cfgD['p_ac'])
  10. return cfg