摘要: 转载:https://www.cnblogs.com/hongten/p/hongten_python_xml_etree_elementtree.html 阅读全文
posted @ 2017-12-26 15:09 deadwood_2016 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 1.新建xml import xml.etree.ElementTree as ETa=ET.Element('elem')c=ET.SubElement(a,'child1')c.text="some text"d=ET.SubElement(a,'child2')d.text="hellp"ro 阅读全文
posted @ 2017-12-26 14:40 deadwood_2016 阅读(517) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.jb51.net/article/79494.htm 这篇文章主要为大家详细介绍了深入解读Python解析XML的几种方式,以ElementTree模块为例,演示具体使用方法和场景,感兴趣的小伙伴们可以参考一下 这篇文章主要为大家详细介绍了深入解读Python解析XML的 阅读全文
posted @ 2017-12-26 10:47 deadwood_2016 阅读(9767) 评论(3) 推荐(1) 编辑
摘要: import configparser#read data from conf filecf=configparser.ConfigParser()cf.read("biosver.cfg")#返回所有的sections=cf.sections()print(s)#返回information sec 阅读全文
posted @ 2017-12-26 10:26 deadwood_2016 阅读(232) 评论(0) 推荐(0) 编辑