def login():
    user = eval(input('Username [%s]: ' % getpass.getuser()))
if not user:
    user = getpass.getuser()
pprompt = lambda : (getpass.getpass(), getpass.getpass('Retype password: '))
Read password from stdin