示例#1
0
文件: core.py 项目: Leopardob/omtk
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)
示例#2
0
文件: core.py 项目: Leopardob/omtk
def import_yaml(str_, **kwargs):
    dicData = yaml.load(str_)
    return _import_basicData(dicData)