From 97820578f0503d159ae16fcb40735e832959ae73 Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Fri, 1 Jul 2016 19:20:34 -0500 Subject: [PATCH] Show the index of the selections for users. --- passport/dialog.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/passport/dialog.py b/passport/dialog.py index d9ffe2f..265dac0 100644 --- a/passport/dialog.py +++ b/passport/dialog.py @@ -24,7 +24,7 @@ def get_input(pool): # Redirect sys.stdin to an open filehandle from which input() # is able to read sys.stdin = open("/dev/tty") - selection = input("» Select an [ID] or enter «(q)uit» to exit: ") + selection = input("» Select an ([ID]) or enter «(q)uit» to exit: ") try: selection = int(selection) @@ -57,10 +57,11 @@ def print_choice(choice): for key, value in choice.items(): if value.get("flag") == "global": msg = """ - ~:Global passport: + ~:Global passport ({}): . User: {} . E-Mail: {} """.format( + key, value["name"], value["email"] ) @@ -69,10 +70,12 @@ def print_choice(choice): if value.get("service"): msg = """ - ~Passport: {} + ~Passport: ({}) + . Service: {} . User: {} . E-Mail: {} """.format( + key, value["service"], value["name"], value["email"]