发布时间:2019-07-15 10:45:51编辑:auto阅读(1863)
工作中的一个小脚本
目的:用于修改配置文件setting.ini,新增一个新的配置项
import ConfigParser cf = ConfigParser.ConfigParser() filepath = 'setting.ini' cf.read(filepath) for i in cf.sections(): cf.set(i,'user', 'test') with open(filepath, 'wb') as configfile: cf.write(configfile)
上一篇: python用作监控
下一篇: Python 学习笔记
51570
51156
41666
38422
32912
29886
28602
23563
23498
21845
1996°
2707°
2267°
2189°
2649°
2208°
2962°
4897°
4731°
3371°