次のスクリプトを実行すると:
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'