password protect a folder
is there a way to protect a folder so that others cant get into it. please do this in python.
simple answer: you can't.
long answer: technically you can prevent people from seeing certain things, like secrets using .env
You can't password protect a folder in a repl. If your are looking to store credentials, you can make a .env
file to store your credentials in instead. (.env
files are automatically protected and private.)
What kind of functionality do you want out of this folder?
Do you want read/write access while the folder is locked, or does it not matter?
Also, this is more of an OS question rather than a coding question. Replit runs on Ubuntu, so maybe do some research into password-protected folders on Ubuntu.
@SixBeeps the folder should be readable to the account that owns that folder. if someone trys to open the folder in another account it should error( not the program)
try using
.env
filestry this link for more info.
https://dev.to/jakewitcher/using-env-files-for-environment-variables-in-python-applications-55a1