This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients philippewagnieres@hispeed.ch, xtreak
Date 2018-09-11.11:38:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536665917.33.0.0269046726804.issue31535@psf.upfronthosting.co.za>
In-reply-to
Content
Ah my bad again. The config.optionxform = str does the trick. I was using an older object.

from configparser import ConfigParser

config = ConfigParser(allow_no_value=True)
config.optionxform = str
config.add_section('default_settings')
config.set('default_settings', '; comment HERE')

with open('example_case.ini', 'w') as configfile: config.write(configfile)
with open('example_case.ini', 'r') as configfile: print(configfile.read())


Thanks
History
Date User Action Args
2018-09-11 11:38:37xtreaksetrecipients: + xtreak, philippewagnieres@hispeed.ch
2018-09-11 11:38:37xtreaksetmessageid: <1536665917.33.0.0269046726804.issue31535@psf.upfronthosting.co.za>
2018-09-11 11:38:37xtreaklinkissue31535 messages
2018-09-11 11:38:37xtreakcreate