[New-bugs-announce] [issue40476] Write file failed on OS X 10.15.4

韩振宇 report at bugs.python.org
Sat May 2 07:49:13 EDT 2020


New submission from 韩振宇 <0oshowero0 at gmail.com>:

When I write a long file using write() function, the resulting file is truncated into some specific level when the file is newly establised. However, when the file is existing, the full length can be achieved.

Here is the example code:

f = open('test_output','w')
length = 195364
for i in range(length):
    f.write(str(i)+'\r\n')

On my macOS 10.15.4 and conda virtual environment
conda create -n test python=3.7.4

When the test_output file is not existing, the content of the file is truncated into 195280, while i is 195364 after the writing process.

Then I re-run the code without deleting the file, the output is normal.

----------
components: IO
messages: 367927
nosy: 韩振宇
priority: normal
severity: normal
status: open
title: Write file failed on OS X 10.15.4
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40476>
_______________________________________


More information about the New-bugs-announce mailing list