• Home
  • Tutorials
    • Python
    • Machine Learning
    • Pygame
    • Python Quiz
  • 100+ Projects
    • 100+ Python Projects
    • 100+ Java Projects
  • PYTHON HANDWRITTEN NOTES
    • Python Short Notes
    • Complete DSA Notes
    • Python Detailed Notes
  • Python Compiler
    • All Editors
    • Turtle Compiler
    • Online Java Compiler
    • Online C++ Compiler
    • Online C Compiler
  • Contact Us
    • About Us
    • Policy
  • Our Android Apps
    • Unlimited Python Exercises App
    • Complete Linux Commands App

CopyAssignment

We are Python language experts, a community to solve Python problems, we are a 1.2 Million community on Instagram, now here to help with our blogs.

×

Tkinter Login GUI with hiding password

 Harry  June 24, 2020
Tkinter Login GUI with hiding password

Today we are going to discuss how can we create a simple login application using tkinter in Python in which password values will be hidden from the user


Source Code

# importing tkinter
from tkinter import *

# initializing root
root = Tk()

# setting geometry
root.geometry("400x300")


# defining function to print username and password on call
def showinfo():
    print("User Name is", user_name.get())
    print("Password is", password.get())


# defining function to clear entry widgets using .set() method
def clear():
    user_name.set("")
    password.set("")

user_name = StringVar()  # User name variable
password = StringVar()  # Password variable

# creating an entry widget to take username
user_name_Entry = Entry(root, textvariable=user_name).pack(pady=10)
# creating an entry widget to take userpassword
passEntry = Entry(root, textvariable=password, show='*').pack(pady=10)

# creating a button to call "showinfo" function which will print
# username and password in console
Button(root, text='Show Info', command=showinfo).pack(pady=10)

# creating a button to call "clear" function which will clear the entry 
# widgets value of username and userpassword 
Button(root, text='Clear Info', command=clear).pack(pady=10)

# .mainloop() is used when our program is ready to run
root.mainloop()

Output

On Running

Tkinter Login GUI with hiding password Today we are going to discuss how can we create a simple login application using tkinter in Python in which password values will be hidden from the user

On Entering Values

Tkinter Login GUI with hiding password Today we are going to discuss how can we create a simple login application using tkinter in Python in which password values will be hidden from the user

On Clicking the “Show Info” Button

Tkinter Login GUI with hiding password Today we are going to discuss how can we create a simple login application using tkinter in Python in which password values will be hidden from the user

Run Python Code:


Thanks for Reading


Keep Updated for more amazing content like this


Also read:

  • Bakery Management System in Python
    Bakery Management System in Python | Class 12 ProjectFebruary 6, 2023
    In this article, we are going to build one such application that can manage a bakery. Yes! The bakery products are everyone’s favorite, right? We are going to build a console-based Bakery Management System in Python that can manage our bakery which cooks delicious kinds of stuff! This article is your end of wander for…
  • Filter List in Python 10 methods
    Filter List in Python | 10 methodsFebruary 6, 2023
    Filter List in Python is the process of selecting specific items from a list that meet certain criteria. This is a task that you will encounter every now and then if you are working with python. So here you will learn 10 different ways to filter List in Python. 1. Using for loop We start…
  • Pattern Programs in C++
    Top 25 Pattern Programs in C++February 3, 2023
    In this article, I will show you the Top 25 Pattern Programs in C++ that you must learn which will help you to understand the usage of nested loops. We will learn to create different geometrical shapes like Squares, triangles, Rhombus, etc. We have provided the code as well as output for all the patterns…
  • Currency Converter in C++January 30, 2023
    In this article, we will build a simple program for Currency Converter in C++. The user will be able to convert currencies like Dollar, Euro, Pound, and Rupee. This is a console application and very simple to understand as we only use a bunch of conditionals to write the entire program. Features Users can convert…
  • SQLite CRUD Operations in Python
    SQLite | CRUD Operations in PythonJanuary 30, 2023
    CRUD stands for Create Read Update Delete. I will show you how to perform CRUD Operations in Python. You need basic Tkinter and SQLite knowledge before you read further. This app is straightforward, when you will open this app, a GUI with 4 green colored buttons will open to perform CRUD(create read update delete) operations….


Share:
Avatar of Harry

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at admin@copyassignment.com Thank you
Twitter

Post navigation

← Crack Any Password Using Python
Get IP address using Python →

Categories

30 Days of Code allcategorites assignment c and cpp competitive programming data structures and algorithms django tutorial final year project game in python general-python gfg github-copy gui java project gui python projects how-to html css javascript project java java game projects java projects job leetcode Machine Learning ml-shorts ml ai ds project php projects programs in python project ideas pygame tutorial python-error python-short-tutorial python projects python simple programs python sqlite qna python turtle python very small program assignments tutorial web projects

Search….

SiteMap

Python

Machine Learning

Pygame

Data Structures and Algorithms(Python)

Python Turtle

Games with Python

All Blogs On-Site

Python Compiler(Interpreter)

Online Java Editor

Online C++ Editor

Online C Editor

All Editors

Services(Freelancing)

Recent Posts

  • Bakery Management System in Python | Class 12 Project
  • Filter List in Python | 10 methods
  • Top 25 Pattern Programs in C++
  • Currency Converter in C++
  • SQLite | CRUD Operations in Python

Must Read

  • 100+ Python Projects
  • 100+ Java Projects
  • Python Programs
  • JavaScript Projects
  • Java Projects
  • PHP Projects

RoadMap to Learn

  • Python
  • Java
  • JavaScript

Python Handwritten Notes

Click Here to buy now

Python Assignment Help

We also deal with Python Assignments, Homeworks, and Projects. Click Here, to get your Python work done by experts.

close button

© Copyright 2022 www.copyassignment.com. All rights reserved. Developed by copyassignment