> On 5 Dec 2023, at 14:37, Chris Green via Python-list <python-list@python.org> > wrote: > > Are there any Python modules aimed specifically at this sort of > requirement? I tend to use JSON for this type of thing. Suggest that you use the options to pretty print the json that is saved so that a human can read it. For example: ---- import json config = { 'key2': 42, 'key1': 'value 1', } print(json.dumps(config, indent=4, separators=(', ', ': '), sort_keys=True)) ---- % python $T/a.py { "key1": "value 1", "key2": 42 } Barry -- https://mail.python.org/mailman/listinfo/python-list
- Re: IDLE edit... MRAB via Python-list
- Re: IDLE edit... Thomas Passin via Python-list
- Re: IDLE edit... Mats Wichmann via Python-list
- Re: IDLE edit... Friedrich Romstedt via Python-list
- RE: IDLE edit... Steve GS via Python-list
- Re: IDLE edit... MRAB via Python-list
- Re: How/where... Thomas Passin via Python-list
- Re: How/where... Peter J. Holzer via Python-list
- Re: How/where to ... Dan Purgert via Python-list
- Re: How/where to store calibration valu... Mats Wichmann via Python-list
- Re: How/where to store calibration valu... Barry Scott via Python-list
- Re: How/where to store calibration valu... DL Neil via Python-list
- Re: How/where to store calibration... DL Neil via Python-list
- Re: How/where to store calibra... Chris Green via Python-list
- Re: How/where to store calibration valu... Chris Green via Python-list
- How/where to store calibration values -... Greg Walters via Python-list
- Re: How/where to store calibration... rbowman via Python-list
- Re: How/where to store calibra... Peter J. Holzer via Python-list
- Re: How/where to store cal... Grant Edwards via Python-list
- Re: How/where to store... Peter J. Holzer via Python-list
- Re: How/where to ... Chris Green via Python-list