Python Forum
in a login interface when i try login with a user supposed to say test123 but nothing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
in a login interface when i try login with a user supposed to say test123 but nothing
#4
You're looping on toggleonoff, but you never change it. Might as well just do a while True: loop.

Instead of saving the result of the username/password inputs, you're passing it to print(). Then you append the result of the print() to the users and passwords list. But the result of print() is always None, so the users and passwords are lost.

This section:
        x = 0
        for user in users:
            if user == loguser:
                print("test123")
            elif x > len(users):
                break
            x=x+1
Could probably be better written as

if loguser in users:
    print("test123")
Reply


Messages In This Thread
RE: in a login interface when i try login with a user supposed to say test123 but nothing - by bowlofred - Feb-20-2021, 04:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Database connection problems [login, PyQt5, PySql] gradlon93 5 839 Dec-15-2023, 05:08 PM
Last Post: deanhystad
  Help on the User Interface Afia 1 619 Jul-21-2023, 07:22 PM
Last Post: snippsat
  [Solved]Help with SQLite Login Form Extra 7 2,115 Jun-25-2022, 10:53 AM
Last Post: deanhystad
  user interface Button not working Frankduc 4 1,546 Feb-16-2022, 02:52 PM
Last Post: Frankduc
  Python class doesn't invoke setter during __init__, not sure if's not supposed to? mtldvl 2 3,475 Dec-30-2021, 04:01 PM
Last Post: mtldvl
  Avoiding Re-login Goodsayan 0 1,416 Sep-09-2021, 01:53 PM
Last Post: Goodsayan
  Login through a protected directory ebolisa 3 2,144 Jul-24-2021, 09:12 PM
Last Post: ebolisa
  Login to NordVPN on Linux with python script AGreenPig 2 6,158 Feb-09-2021, 10:44 AM
Last Post: AGreenPig
  Help with User Interface design code ai_masti 0 1,980 Nov-19-2020, 05:58 PM
Last Post: ai_masti
  want to make auto login with data R3born 3 2,298 Sep-11-2020, 07:06 PM
Last Post: R3born

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020