python 安装 PyYAML
pip install PyYAML
import yaml
with open('xxx.yaml','r')as f:
doc =yaml.load(f, Loader=yaml.FullLoader)
#通过doc取yaml的内容,然后赋值
with open('xxx.yaml','w')as f:
yaml.dump(doc,f)
python 安装 PyYAML
pip install PyYAML
import yaml
with open('xxx.yaml','r')as f:
doc =yaml.load(f, Loader=yaml.FullLoader)
#通过doc取yaml的内容,然后赋值
with open('xxx.yaml','w')as f:
yaml.dump(doc,f)