Whenever I create a file using the Python “open” function it creates the file just fine. But if that file has been edited manually & deleted, then created again the text manually put there will still be there.
Is this a bug or an intended “feature” either way I would love to know how to get around it.
Additionally I cannot edit the file from within Python if it has ever been manually edited, doesnt matter if it was deleted & recreated. It’s an immortal file that I cant edit or delete from the program.
It is an “intended” feature, since creating a recently-deleted file should restore it (as a way to restore file history). The reason why Python open doesn’t restore the text content is because it directly interacts through the filesystem, not through the Replit website.