Issue 36566: Support password masking in getpass.getpass()

Issue36566

Created on 2019-04-08 20:05 by stevoisiak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg339671 - (view) Author: Steven Vascellaro (stevoisiak) * Date: 2019-04-08 20:05
Support password masking in getpass.getpass()

Currently, getpass.getpass() hides all user input when entering a password. This can throw off non-Unix users who are used to passwords being masked with asterisks *. This has led some users to write their own libraries for this functionality.

Proposal:

- Add an optional argument to `getpass.getpass()` for a character to mask user input

Usage Example:

> import getpass
> password = getpass.getpass(mask='*')
Password: **********
> password = getpass.getpass()
Password:
msg339675 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-04-08 21:05
Thank you for the suggestion.  I believe this is a duplicate of issue 32884.
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80747
2019-04-08 21:05:01cheryl.sabellasetstatus: open -> closed

superseder: Adding the ability for getpass to print asterisks when password is typed

nosy: + cheryl.sabella
messages: + msg339675
resolution: duplicate
stage: resolved

2019-04-08 20:05:07stevoisiakcreate