How to create a login form using python | | Python programming

Veröffentlicht am: 04 Februar 2022
auf dem Kanal: Abdullah's Tutorial
2,528
7

In this video i will teach you how to create a graphical login form using python .In this tutorials we are using tkinter module to create the login form
using python.

Watch this video fully :)

Keep support me to get 1000 subscribers❤


Ask your doubts : abdullahahmad0203@gmail.com

Thanks for watching !!! Like👍 share comment and subscribe our channel for more updates✔✔✔✔

Tags:
#python_programming #pythonak #loginform_python#tkinterLoginForm#loginformFunc

#SourceCode
#passGenrator
f = open('pass','w')
un = input('Enter User Name: ')
ps = input('Enter Password: ')
f.write(un+':'+ps)
print('Password Saved')

Login Page
from logging import root
from tkinter import *

from matplotlib.pyplot import text
loginPg = Tk()
loginPg.title('Login Form')
loginPg.geometry('500x500')

variables
var_UN = StringVar()
var_PS = StringVar()

functions
def login():
f = open('pass','r')
f = f.read()
un, ps = f.split(':')
if var_UN.get() == un:
if var_PS.get() == ps:
print('You Are Login Successfully')
loginPg.destroy()
else:
print('Wrong Pass or User Name')
loginPg.destroy()

window

lbl_title = Label(loginPg, text='Login Form', font = ('times','30'), bg='Black', fg='white')
lbl_title.pack(fill='both')

y_ = 100
lbl_UN = Label(loginPg, text='User Name', font = ('times new roman',20, 'bold')).place(x=20, y=y_)
ent_UN = Entry(loginPg, textvariable=var_UN, font = ('times new roman',20, 'bold')).place(x = 200, y = y_)

y_ += 50
lbl_PS = Label(loginPg, text='Password', font = ('times new roman',20, 'bold')).place(x=20, y=y_)
ent_PS = Entry(loginPg, textvariable=var_PS, show= '*', font = ('times new roman',20, 'bold')).place(x = 200, y = y_)

y_ += 50
btn_LOGIN = Button(loginPg, font = ('',15, 'bold'), command=login, text='Login')
btn_LOGIN.place(x=20,y=y_, width=470, height=40)

loginPg.mainloop()

Thanks For Watching This Video


Auf dieser Seite können Sie das Online-Video How to create a login form using python | | Python programming mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Abdullah's Tutorial 04 Februar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,528 Mal angesehen und es wurde von 7 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!