[New-bugs-announce] [issue28788] Feature request: ConfigParser should be able to write config to a given filename, not only into file object

George Fischhof report at bugs.python.org
Thu Nov 24 10:01:58 EST 2016


New submission from George Fischhof:

Hi There,

I started to use ConfigParser, and found that it has no write to file_name option, but xml paarser (ElementTree) has.

This way ConfigParser works different than xml parsers, as when I use elementtree.write it will create a file with full and valid xml content.

But ConfigParser is "able" ;-) to create file with invalid content (for example (this was my findings) creates duplicated sections. Because the handling of the file is in the user's hand.

So it would be good for ConfigParser to handle file writing and the user!s code would became simplier:

Feature request:
ConfigParser should be able to write config to a given filename, not only into file object.
(Like xml parser)

Kind regards,
George Fischhof

----------
components: Library (Lib)
messages: 281636
nosy: georgefischhof
priority: normal
severity: normal
status: open
title: Feature request: ConfigParser should be able to write config to a given filename, not only into file object
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28788>
_______________________________________


More information about the New-bugs-announce mailing list