takluyver/pyxdg — pull request #7 by ju1ius (2013-12-08 06:30:56+00:00)
Title: IniFile improvements (preserve source order and comments)

IniFile now retains the original groups/keys order between read and writes.
In addition, tha ability has been added to get and set comments for grousp and keys. "group comments" are those that appear right before a group, while "key comments" appear right before a key.

Groups and keys are only sorted on iteration using IniFile.groups() and IniFile.keys() in order not to impact read performance.