Skip to content

Instantly share code, notes, and snippets.

@Jip-Hop
Jip-Hop / README.md
Last active July 6, 2025 02:44
Simple comment preserving ConfigParser class to read/update/write INI files WITHOUT indented sections/keys/comments.

See the example usage inside configparser.py. Output when running the configparser.py file:

# Comments may appear before the first section

[Simple Values]
key = value
spaces in keys = allowed
spaces in values = allowed as well
spaces around the delimiter = obviously