1
Problems when writing files
miracle173 (2)

I do some calculations that took rather long (https://repl.it/@miracle173/ponder201905). I alternately write files named statefile1.txt and statefile2.txt- But when I want to view the content of the file and open it by a mouse click, the files are empty.
The purpose of these files is to save the status of the calculation periodically. If the program is interrupted I can start it again and force it to read this state files and the calculation can be continued at the point of the last state saved in the file. This kind of continuation of my program works fine when I run my program on my notebook, but seldom works when I rerun my program at "repl.it". Unfortunately it happens often that my repl.it-session is disconnected and I want to recover my program execution from this state files. But most of the time this does not work on repl.it.

You are viewing a single comment. View All
Answered by JustARatherRidi (185) [earned 5 cycles]
View Answer
1
miracle173 (2)

@JustARatherRidi
Thank you
Both hints were helpful
From the the question you linked to I got the information to use the explorer role.
After this I was able to see the content of the file after refreshing the browser. But this was still not satisfying.
So I use https://www.jsonstore.io/ as you proposed. To access this there is a useful Python module described here: https://repl.it/talk/share/NEW-Python-Lib-for-wwwjsonstoreio-DONT-LOOSE-YOUR-D-AGAIN-WITH-JSON-STORE-NEW/10956