[Idle-dev] IDLE getpass?

Tal Einat taleinat at gmail.com
Thu Jul 26 08:36:42 CEST 2007


On 7/26/07, Douglas S. Blank <dblank at brynmawr.edu> wrote:
> Is there an easy way that one can enter a password in IDLE but not have
> the characters show (or just show asterisks)? The only way I can think of
> is to bind(<KeyPress>) but that seems to be overkill. I'm looking for
> something like replacing sys.stdout or some Tkinter function. Any hints
> appreciated.

A good starting point would be:

from tkSimpleDialog import askstring
askstring('Enter Password', 'Password: ', show='*')

You'd have to work out a few Tk kinks to get it to work smoothly...
but it works.

- Tal


More information about the IDLE-dev mailing list