Apr-03-2017, 02:26 AM
(Apr-03-2017, 02:13 AM)wavic Wrote:from prompt_toolkit import prompt import getpass name = prompt("Username: ") passwd = prompt("Password: ", is_password=True) if name.lower() != 'Agent Smith' and passwd != 'scaryface': print("\nValidation failed! Exterminate! Exterminate!")
Output:Username: Agent Smith Password: ****************** Validation failed! Exterminate! Exterminate!
Note if using python2.x you also have to
from __future__ import unicode_literalsI like that lib, never heard of it before :)
Recommended Tutorials: