You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import yaml
|
|
import os
|
|
|
|
|
|
def get_yaml_data(yaml_file):
|
|
# 打开yaml文件
|
|
file = open(yaml_file, 'r', encoding="utf-8")
|
|
file_data = file.read()
|
|
file.close()
|
|
|
|
# 将字符串转化为字典或列表
|
|
data = yaml.load(file_data)
|
|
return data
|