Ask coding questions

← Back to all posts
Can you hide files?
PYer (3991)

I don't mean hiding repls. You need the hacker plan for that. But lets say there is a file in a repl that you do not want anyone to see. Maybe it can hold some information that must remain confidential, or its a list of people who have won and lost at the game that only you want to know. I am just wondering if there is any way to do that.

Answered by timmy_i_chen (1167) [earned 5 cycles]
View Answer
timmy_i_chen (1167)

Indeed you can! You can use .env files - check out the docs here:

grrlic (2)

@timmy_i_chen Hi Timmy, sorry for tagging. Just feeling like you may know the answer to my recent question.

grrlic (2)

Hi, I would like to re-raise this topic. Let's say the program fetching a secret json file that depends on who is running the REPL. Can I specify which file extensions to hide when other people forking? e.g. .json files

cyap (0)

That is also what I was trying to ask!!!

PYer (3991)

@cyap i was told to use .env problems. they mostly work, unless you want it to be public (the repl) then an error will be caused because the file disappears if it is not in your account