New submission from Boštjan Mejak <bostjan.xpe...@gmail.com>:

In every Python version that I've tested, writing a config.ini file (utilizing 
configparser.ConfigParser), the result is such that the config.ini file has 2 
newlines at the end of the file.

The problem is that source code editors like Sublime Text, or IDEs like 
PyCharm, already insert a newline at the end of a file, but then 
configparser.ConfigParser 
(or maybe the Python's write() function?)  insert its own as well.

Is it possible to fix this behavior?

----------
components: Library (Lib)
messages: 403069
nosy: PythonEnthusiast
priority: normal
severity: normal
status: open
title: configparser.ConfigParser: 2 newlines at end of file (EOF)
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45349>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to