def import_yaml_file(path, **kwargs): if not os.path.exists(path): raise Exception("Can't importFromYamlFile, file does not exist! {0}".format(path)) with open(path, 'r') as fp: dicData = yaml.load(fp) return _import_basicData(dicData)
def import_yaml(str_, **kwargs): dicData = yaml.load(str_) return _import_basicData(dicData)