main.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:yml2json 作者: neo1104 项目源码 文件源码
def yml_2_json():
    json_text.delete(1.0, tk.END)
    error_tips['text']=tips_str
    txt = yml_text.get(1.0, tk.END)
    if len(txt) <= 1:
        return
    try:
        yml_doc = yaml.load_all(txt)
        j = ""
        for obj in yml_doc:
            j += json.dumps(obj, indent=4)
        json_text.insert(1.0, j)
    except:
        error_tips['text']=tips_str + 'YAML????'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号