How to hide password characters in Python -


i new in world of python.
created simple program in added username , password entry (no gui) using if else conditional expression.
when type username in program, appears simple text, , that's ok.
when type in password field, appears simple text.
want password instead display '*' login prompts.

how change password field show => ***** ?????????.

usr = (str(input('username : '))) if usr == 'python':   password = (str(input('password : ')))   if password == 'root':     print ('login succesfull')   else:     print ('wrong password') else:   print ('wrong username') 

there getpass(), function hides user input.

 import getpass   password = getpass.getpass()  print(password)   mypass = getpass.getpass("password : ") 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -