How should I protect my password in Python 2.7? getpass.getpass()
method is not working. At the time when I run my code, the password is visible.
I have done something like this:
M = imaplib.IMAP4_SSL('imap.gmail.com')
try:
emailid=input("what is your email id: ")
password=getpass.getpass("enter your password: ")
M.login(emailid,password)