0

Possible Duplicate:
Getting command-line password input in Python

I was wondering how to make a password input on python, if you dont know what I'm saying well I mean like if I typed in something like "hello" it will add "*****" instead as if you were typing in a password

Community
  • 1
  • 1
David Callanan
  • 5,601
  • 7
  • 63
  • 105
  • At the command line? It's worth noting that if that is the case, the standard for Linux tools is to not print anything, not printing stars. – Gareth Latty Sep 28 '12 at 19:51

1 Answers1

1

Look at getpass. You can use it as:

from getpass import getpass
passwd = getpass()

It doesn't print stars, though.

Lev Levitsky
  • 63,701
  • 20
  • 147
  • 175