发布时间:2019-07-15 10:45:51编辑:auto阅读(2051)
工作中的一个小脚本
目的:用于修改配置文件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 学习笔记
53272
40151
34529
30266
25178
24973
23373
16901
14967
14480
861°
786°
856°
865°
923°
1038°
1035°
1027°
1138°
1049°