Example #1
0
 def prompt_auth(self, msg):
     import getpass
     print_stderr(msg)
     response = getpass.getpass('')
     if len(response) == 0:
         return None
     return response
Example #2
0
 def prompt_auth(self, msg):
     import getpass
     print_stderr(msg)
     response = getpass.getpass('')
     if len(response) == 0:
         return None
     return response
Example #3
0
 def get_pin(self, msg):
     t = { 'a':'7', 'b':'8', 'c':'9', 'd':'4', 'e':'5', 'f':'6', 'g':'1', 'h':'2', 'i':'3'}
     print_stderr(msg)
     print_stderr("a b c\nd e f\ng h i\n-----")
     o = raw_input()
     try:
         return ''.join(map(lambda x: t[x], o))
     except KeyError as e:
         raise Exception("Character {} not in matrix!".format(e)) from e
Example #4
0
 def get_pin(self, msg):
     t = {
         'a': '7',
         'b': '8',
         'c': '9',
         'd': '4',
         'e': '5',
         'f': '6',
         'g': '1',
         'h': '2',
         'i': '3'
     }
     print_stderr(msg)
     print_stderr("a b c\nd e f\ng h i\n-----")
     o = raw_input()
     try:
         return ''.join(map(lambda x: t[x], o))
     except KeyError as e:
         raise Exception("Character {} not in matrix!".format(e)) from e
Example #5
0
 def show_message(self, msg, on_cancel=None):
     print_stderr(msg)
Example #6
0
 def show_error(self, msg, blocking=False):
     print_stderr(msg)
Example #7
0
 def get_passphrase(self, msg, confirm):
     import getpass
     print_stderr(msg)
     return getpass.getpass('')
Example #8
0
 def yes_no_question(self, msg):
     print_stderr(msg)
     return raw_input() in 'yY'
Example #9
0
 def get_passphrase(self, msg, confirm):
     import getpass
     print_stderr(msg)
     return getpass.getpass('')
Example #10
0
 def show_error(self, msg, blocking=False):
     print_stderr(msg)
Example #11
0
 def show_message(self, msg, on_cancel=None):
     print_stderr(msg)
Example #12
0
 def yes_no_question(self, msg):
     print_stderr(msg)
     return raw_input() in 'yY'