YAML 对中文的处理
Posted 痴道三
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了YAML 对中文的处理相关的知识,希望对你有一定的参考价值。
from yaml import load,dump
f = open(‘xx.ymal‘,encoding=‘utf-8‘)
l = load(f)
print(f)
w = open(‘xx_copy.ymal‘,‘w‘,wencoding = ‘utf-8‘)
dump(l,w,allow_unicode = True)
以上是关于YAML 对中文的处理的主要内容,如果未能解决你的问题,请参考以下文章
Google App Engine Node.js 应用程序 - “解析 app.yaml 时出错:未知 url 处理程序类型”
pytest+yaml+allure接口自动化测试框架04.处理request