This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients Andrei.Kucharavy, iritkatriel, lukasz.langa, r.david.murray
Date 2022-03-19.20:06:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647720361.14.0.906061213873.issue19991@roundup.psfhosted.org>
In-reply-to
Content
It's not just that it can't be pretty printed - it doesn't even have __str__ or __repr__.

I think the only thing we have now it write, which can do this:

>>> config = configparser.ConfigParser()
>>> config['DEFAULT'] = {'ServerAliveInterval': '45','Compression': 'yes','CompressionLevel': '9'}
>>> f = io.StringIO()
>>> config.write(f)
>>> f.getvalue()
'[DEFAULT]\nserveraliveinterval = 45\ncompression = yes\ncompressionlevel = 9\n\n'
>>> pprint.pprint(f.getvalue())
('[DEFAULT]\n'
 'serveraliveinterval = 45\n'
 'compression = yes\n'
 'compressionlevel = 9\n'
 '\n')
>>>


Is this enough, or should something be added?
History
Date User Action Args
2022-03-19 20:06:01iritkatrielsetrecipients: + iritkatriel, r.david.murray, lukasz.langa, Andrei.Kucharavy
2022-03-19 20:06:01iritkatrielsetmessageid: <1647720361.14.0.906061213873.issue19991@roundup.psfhosted.org>
2022-03-19 20:06:01iritkatriellinkissue19991 messages
2022-03-19 20:06:01iritkatrielcreate