I need to both read and write settings to an INI file. This is trivial using the standard configparser module in Python. I see that there is a rs.GetSettings function but no corresponding rs.WriteSettings so that direction won’t work.
I tried import configparser as I would in Python but that is not available.
After some searching there is a ConfigParser module available (with different capitalization) but this does not behave the way the standard module does.
or implementing __getitem__ yourself on a subclass:
class DictParser(ConfigParser.ConfigParser):
def __getitem__(self, x):
return dict(self.items(x))
My experience with ConfigParser was nonetheless, erm, trying. I switched to .toml files.
toml from PyPi worked great for a while, but unicode didn’t work in GhPython with it. It had so many bugs, was so poorly maintained and poorly tested in general compared to tomli and tomli-w, that I forked the latter two especially for GhPython: