• Home
  • Privacy Policy
  • About Us
  • Contact Us
×
 Posted in allcategorites, gui python projects

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

On Entering Values


On Clicking the “Show Info” Button


Run Python Code:


Thanks for Reading


Keep Updated for more amazing content like this


Also read:

  • Aya Expanse supports multiple languages for diverse global applications
    Aya Expanse supports multiple languages for diverse global applicationsMarch 12, 2026
    Snapshot Aya Expanse is a cutting-edge multilingual model that has achieved exceptional performance across 23 different languages, setting a new benchmark for language understanding and generation capabilities. Why this matters The implications of Aya Expanse are significant, as it enables developers to create more inclusive and effective applications that can cater to diverse user bases…
  • Alibaba releases Page Agent on GitHub for public access
    Alibaba releases Page Agent on GitHub for public accessMarch 12, 2026
    Snapshot GitHub’s trending page has highlighted Page Agent, an open-source project by Alibaba. This innovative tool allows for efficient and simplified web page analysis, providing developers with valuable insights into page performance and structure. Why this matters Page Agent’s ability to analyze web pages and provide actionable data has significant implications for developers. By leveraging…
  • Google Sheets Gemini reaches new levels of performance and accuracy
    Google Sheets Gemini reaches new levels of performance and accuracyMarch 12, 2026
    Gemini in Google Sheets has achieved state-of-the-art performance, with a 70.48% success rate in autonomously manipulating complex, real-world spreadsheets on the full SpreadsheetBench dataset. This milestone marks a significant advancement in AI-powered spreadsheet capabilities, positioning Gemini as a leader in the field. Situation The recent announcement of new beta features for Gemini in Sheets has…
  • Artificial intelligence boosts cardiac care in rural Australian communities
    Artificial intelligence boosts cardiac care in rural Australian communitiesMarch 12, 2026
    Google is partnering with leading Australian health organizations to bring new AI tools to regional communities, with a $1 million investment from Google Australia’s Digital Future Initiative. This project aims to identify heart health risks early, making proactive care possible for more people, particularly in rural Australia where individuals are 60% more likely to die…
  • NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments
    NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence DevelopmentsMarch 12, 2026
    NVIDIA’s GTC 2026 conference is now underway, bringing together 30,000 attendees from 190 countries to explore the latest advancements in AI, with a focus on engineering implications. This year’s event introduces OpenClaw, the fastest-growing open source project in history, allowing attendees to build and deploy their own proactive, always-on AI assistants. What’s New with OpenClaw…


Tagged gui, tkinter, Tkinter Login GUI with hiding password
Share:

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

Related Articles

  • Python | Reverse a list without recursion
  • Python | lambda function that returns the maximum of 2 numbers
  • I Love You HTML code
  • first job hack
    Connect with HR Directly – Job Hack

Post navigation

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

Search

Recent Posts

  • Aya Expanse supports multiple languages for diverse global applications
  • Alibaba releases Page Agent on GitHub for public access
  • Google Sheets Gemini reaches new levels of performance and accuracy
  • Artificial intelligence boosts cardiac care in rural Australian communities
  • NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments
  • Google DeepMind Updates Satellite Embedding Dataset with 2025 Data

Copyright © 2026 CopyAssignment