Answer the question
In order to leave comments, you need to log in
Why does writing to a file not work when the script runs for a long time?
There is some iterator function:
inc(last):
with open(last,"r+") as fil:
i = int(fil.readline())
fil.seek(0)
fil.write(str(i+1))
fil.truncate()
fil.flush()
fil.close()
print i
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question