How to create a password entry field using Tkinter

Hick picture Hick · Mar 10, 2010 · Viewed 67.1k times · Source

I am trying to code a login window using Tkinter but I'm not able to hide the password text in asterisk format. This means the password entry is plain text, which has to be avoided. Any idea how to do it?

Answer

Federico klez Culloca picture Federico klez Culloca · Mar 10, 2010

A quick google search yielded this

widget = Entry(parent, show="*", width=15)

where widget is the text field, parent is the parent widget (a window, a frame, whatever), show is the character to echo (that is the character shown in the Entry) and width is the widget's width.