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

Publié le: 04 février 2022
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne How to create a login form using python | | Python programming durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Abdullah's Tutorial 04 février 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,528 fois et il a aimé 7 téléspectateurs. Bon visionnage!