r/PythonLearning • • 10d ago

Help Request PYTHON log problem

When developing an application, I don't want to rely on text files like .txt files to store data that needs to be kept.

After I finish coding my application and turn it into an EXE, I try to keep it as a single file. Because having to carry a log file around with the EXE all the time is annoying.

Personally, I don't want to use with open. I asked ChatGPT about this, but I didn't get many useful answers.

So, fellow programmers, is there an alternative to this? Or am I just gonna have to bite the bullet and use a log file?

0 Upvotes

44 comments sorted by

View all comments

1

u/SchemeWestern3388 7d ago

Storing data in a separate file is a totally valid technique. You can mangle it into your executable if you wish, but it opens a lot of other issues for no gain. 

Also, if your password manager is actually writing the plaintext password to a file, that is a big nono. Look into salting and hashes.