-1

I have a small project that I'm making for school which is a music player in python 3.11. I have made a checkbox on my login page for Remember Me, but I don't actually know how I'm supposed to remember the user.

As this isn't a web app, I can't use cookies and that's as far as my knowledge goes when it comes to this sort of thing. Is there some sort of cookie for a computer which I can recognize users that way?

Thanks!

I looked online on some ways to do it and what I've seen was using HTTP and protocols which I don't think is relevant to my situation? But maybe I'm wrong, either way I'd love feedback.

  • Please refer to this guide on how to provide a [mre], and read about [ask]. Remember, we can't help you if we don't know what you've already tried. – JRiggles Jun 07 '23 at 13:29
  • What part of the app is user-specific? Configuration? Then probably https://stackoverflow.com/questions/11228645/where-to-store-the-configuration-files-of-python-applications-on-windows anyways: What platform are you on? – Dschoni Jun 07 '23 at 13:31
  • You're going to have to be a bit more specific. Is it installed on Windows machines? Is it run from a different Windows username for each user? – Axe319 Jun 07 '23 at 13:31
  • @Dshconi I'm not sure if that's an answer I would go with as most of the answers there are pretty old and obsolete. The [link](https://softwareengineering.stackexchange.com/questions/160097/where-should-i-put-configuration-files) in the comments has some good suggestions though. – Axe319 Jun 07 '23 at 13:37
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 07 '23 at 15:07
  • @Dschoni Sorry for my incompetence, first time posting. It's a python script running on Windows which is supposed to be multi-client, and yes its a different Windows username for each user. As for what I've tried so far that wouldn't be anything because again I'm inept at this concept. – Jonikles Jun 07 '23 at 17:45
  • You could simply get the windows username for the current user if this is enough to identify a unique user: https://stackoverflow.com/questions/13654122/how-to-make-python-get-the-username-in-windows-and-then-implement-it-in-a-script – Dschoni Jun 19 '23 at 13:05
  • As mentioned in this answer, don't use that for authentification, just for identification: https://stackoverflow.com/a/842096/1866177 – Dschoni Jun 19 '23 at 13:07

1 Answers1

0

You can write the information in a file and store it. Then you can open the file and read it to get the user information.

Darkshadogt
  • 49
  • 1
  • 5
  • I appreciate the reply! The storage of the information isn't the issue. I'll fit it later for the need of my code which is irrelevant. The problem is I don't know the information that I need TO retrieve in the first place, what's this unique thing that I need to get to identify each computer from the rest. – Jonikles Jun 07 '23 at 17:48