I have an INI windows file with the following format:
[STRINGS]
property 1 = "hello"
property 2 = ""
PROPERTY 3 = ""
but if I get values using ConfigParser
init_values= ConfigParser.RawConfigParser(allow_no_value=True)
init_values.optionxform = str
init_values.read(init_file)
and modify one of them (p.e. property 1)
init_values.set('STRINGS', 'property 1', '"world"')
init_values.write(configfile)
I get the following result:
[STRINGS]
property 1 = "world"
property 2 =
PROPERTY 3 =
All the quotes from empty values are removed.
How can I force to use quotes even in empty values?