Ask coding questions

← Back to all posts
Repl.it file clearing
isaiah08 (63)

Does a .txt file that i have written into using python (filename.write()) clear after an hour? I have heard about this but never seen it in action.

Answered by Coder100 (17122) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (17122)

yeah, it does, unless the owner is on the repl for the entire hour. This is a security thing, because if it wasn't this way hackers could abuse it.

isaiah08 (63)

Ok. I like to use it as a database, are there any other options? @Coder100

Coder100 (17122)

repl.it db (the official one) works great @isaiah08

Coder100 (17122)

turn on explorer mode (in your settings), and you should be able to see it in a python repl. @isaiah08

isaiah08 (63)

Can you give me a link to a tutorial? Thanks! @Coder100

isaiah08 (63)

I am using replit.db, but still getting an error. Is this from flask or replit and how do i fix it? Thanks! @Coder100