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.
Created on 2011年10月16日 17:47 by mrblabla, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg145632 - (view) | Author: Mr Bla Bla (mrblabla) | Date: 2011年10月16日 17:47 | |
ConfigParser writes data to the config file using hard-coded newline: '\n'. This newline is not suitable for Windows. Therefore, the config file isn't readable in Notepad.exe. os.linesep should be used instead. |
|||
| msg151829 - (view) | Author: Łukasz Langa (lukasz.langa) * (Python committer) | Date: 2012年01月23日 17:17 | |
That is indeed the behaviour. Citing the tutorial: "Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written." When you're opening the file in binary mode, \n characters are not altered. Opening a file that way specifies programmer intent and I don't think we should force os.linesep in that case. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:22 | admin | set | github: 57399 |
| 2012年01月23日 17:17:36 | lukasz.langa | set | status: open -> closed resolution: works for me messages: + msg151829 stage: resolved |
| 2011年10月17日 15:36:51 | eric.araujo | set | assignee: lukasz.langa versions: + Python 3.3, - Python 2.6 nosy: + lukasz.langa components: + Library (Lib), - None |
| 2011年10月16日 17:47:51 | mrblabla | create | |