yaml基础用法
yaml模块+easydict模块使用
yaml模块+easydict模块使用
filename.yaml
import yaml
from easydict
import EasyDict
filepath
= 'filename.yaml'
config
= yaml
.load
(open(filepath
), Loader
=yaml
.FullLoader
)
config
= EasyDict
(config
)
print(config
.name
)
print(config
.children
)
`
转载请注明原文地址:https://blackberry.8miu.com/read-8887.html