12

I'm using raw_input() to receive password from user in interactive mode, but I want to make input symbols invisible for security reasons, as it is when you're typing your password using sudo or connecting to a database. How I should do it?

Enchantner
  • 1,534
  • 3
  • 20
  • 40

1 Answers1

18

You need the getpass module.

from getpass import getpass
password = getpass()
jkp
  • 78,960
  • 28
  • 103
  • 104