as one knows, the ConfigParser from Python is designed for working with the old nt-style *.ini
files from Microsoft. Anyway, it seems to be an not unusual case to use the ConfigParser for *.properties
files as well, as they have a similar structure to the ini ones.
In my use-case, I want to parse a properties-file which works fine manually adding a dummy-section and then editing/reading the attributes. Anyway, I am currently searching for a solution of how to update the file without the section included. I.e. configparser.write() generates a file similar to the following lines:
[root]
a1 = v1
a2 = v2
...
In order to use the file lateron it is needed to remove the dummysection line. This could be done removing the first line of the file, but I was hoping that anyone would know a better solution taking advantage of configparser methods. Thanks in advance.