[New-bugs-announce] [issue30460] file opened for updating cannot write after read
Jeremy Kloth
report at bugs.python.org
Wed May 24 15:07:32 EDT 2017
New submission from Jeremy Kloth:
Attempting to append to an existing file fails with no error set:
>>> import os, tempfile
>>> fd, fn = tempfile.mkstemp()
>>> os.write(fd, 'some text')
9
>>> os.close(fd)
>>> with open(fn, 'r+') as f:
... f.read()
... f.write('more text')
...
'some text'
Traceback (most recent call last):
File "<interactive input>", line 3, in <module>
IOError: [Errno 0] Error
(error 0 is defined as NO_ERROR)
----------
components: IO, Windows
messages: 294379
nosy: jkloth, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: file opened for updating cannot write after read
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30460>
_______________________________________
More information about the New-bugs-announce
mailing list