运维网's Archiver
论坛
›
Python
› python ConfigParser 模块
yt-summer
发表于 2018-8-15 12:39:55
python ConfigParser 模块
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)
页:
[1]
查看完整版本:
python ConfigParser 模块