如果我运行以下脚本:
from configobj import ConfigObj
config = ConfigObj()
config.filename = 'test.cfg'
config['keyword1'] = "the value"
config['keyword2'] = "'{0:s}'".format("the value")
config['keyword3'] = '"{0:s}"'.format("the value")
config.write()
输出是:
keyword1 = the value
keyword2 = "'the value'"
keyword3 = '"the value"'
有没有办法产生以下输出?
keyword1 = 'the value'