Password input in console/terminal

cadmuxe cadmuxe at gmail.com
Tue Dec 9 03:05:58 EST 2008


On 12月9日, 下午2时01分, "Chris Rebert" <c... at rebertia.com> wrote:
> On Mon, Dec 8, 2008 at 9:53 PM, RP <nops... at gmail.com> wrote:
> > Hello All,
>
> > This is my first REAL post(question) to Python-List. I know I can take input
> > from a user with raw_input()
> > How do I take password input in console? Any Help would be Greatly
> > Appreciated. Thank You. RP
>
> You use the appropriately-named `getpass` module:http://docs.python.org/library/getpass.html
>
> Cheers,
> Chris
>
> --
> Follow the path of the Iguana...http://rebertia.com

you can use getpass()
import getpass
passwd = getpass.getpass()

-------
>>> import getpass
>>> passwd = getpass.getpass()
Password:



More information about the Python-list mailing list