[docs] [issue28714] Addition to Documentation of configparser.ConfigParser.write() documentaion
George Fischhof
report at bugs.python.org
Wed Nov 16 10:00:35 EST 2016
New submission from George Fischhof:
Hi There,
I used configparser.ConfigParser.write() to update a config file.
And I found that my config wa duplicated.
The file was opened with mode 'r+'
I figured out that write (I mean the write method of configparser) writes at actual file position.
I issued a file.seek(0) command before write and the result was good.
So I think documentaion should advice to user to reopen the file with mode 'w' or to issue a file.seek(0) command before using the ConfigParser.write()
I used the following python version on windows:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
affected documentation:
https://docs.python.org/3.5/library/configparser.html#configparser.ConfigParser.write
Best Regards,
George Fischhof
----------
assignee: docs at python
components: Documentation
messages: 280960
nosy: docs at python, georgefischhof
priority: normal
severity: normal
status: open
title: Addition to Documentation of configparser.ConfigParser.write() documentaion
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28714>
_______________________________________
More information about the docs
mailing list