New submission from 韩振宇 <0oshowe...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue40476>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to