The code snippet below can edit an ini file, but will replace all ini entries to lower case:
config = ConfigParser.RawConfigParser()
config.read("test.ini")
config.set("GENERAL", "OptionEntry4", "100")
with open("test.ini", 'w') as configfile:
config.write(configfile)
ini file before edit:
[GENERAL]OptionEntry1 = 10
OptionEntry2 = 20
OptionEntry3 = 30
OptionEntry4 = 40
OptionEntry5 = 50
ini file after edit:
[GENERAL]optionentry1 = 10
optionentry2 = 20
optionentry3 = 30
optionentry4 = 100
optionentry5 = 50