A limit to writing to a file from a loop?

Chris Angelico rosuav at gmail.com
Tue Feb 12 14:09:31 EST 2019


On Wed, Feb 13, 2019 at 5:58 AM Steve <Gronicus at sga.ninja> wrote:
>
> My program reads from a text file (A), modifies the data, and writes to another file (B).
> This works until I reach about 300 writes and no more lines are written to file (B).
>
> I had to create a Counter and increment it to 250 when it gets reset.
>
> Upon reset, I close the file (B) being written and reopen it for append.
>
> Then it accepts the entire list of lines of data.
>
>
>
> Bizarre?

Without knowing what else is going on, we have no idea what the
problem is. All we see is your workaround.

ChrisA


More information about the Python-list mailing list