def get_pin(self, msg, *, show_strength=True): 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
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
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_msg(msg) print_msg("a b c\nd e f\ng h i\n-----") o = raw_input() return ''.join(map(lambda x: t[x], o))
def yes_no_question(self, msg): print_stderr(msg) return raw_input() in 'yY'
def yes_no_question(self, msg): print_stderr(msg) return raw_input() in 'yY'