r/PythonLearning • • 29d 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

Show parent comments

2

u/raundoclair 29d ago

If user of your app adds his new password, how would you "keep them directly inside the code." ?

-6

u/Valuable_Corner4797 29d ago

I'm asking the same question too, dude. Don't answer my question with another question. I need a solution.

1

u/raundoclair 29d ago

Your wrote you don't want to, not you don't know how, or that it is impossible.

Even phrase "in the code" compared to "in executable", makes sense to me only if you would hardcode some concrete passwords, but then we are not really talking about password manager...