def main():
    result = radiolist_dialog(
        values=[
            ("red", "Red"),
            ("green", "Green"),
            ("blue", "Blue"),
            ("orange", "Orange"),
        ],
        title="Radiolist dialog example",
        text="Please select a color:",
    ).run()

    print("Result = {}".format(result))

    # With HTML.
    result = radiolist_dialog(
        values=[
            ("red", HTML('<style bg="red" fg="white">Red</style>')),
            ("green", HTML('<style bg="green" fg="white">Green</style>')),
            ("blue", HTML('<style bg="blue" fg="white">Blue</style>')),
            ("orange", HTML('<style bg="orange" fg="white">Orange</style>')),
        ],
        title=HTML("Radiolist dialog example <reverse>with colors</reverse>"),
        text="Please select a color:",
    ).run()

    print("Result = {}".format(result))
def select_run():
    logs_dir = get_logs_dir()
    log_dirs = [x for x in sorted(logs_dir.iterdir()) if x.is_dir()]
    if len(log_dirs) == 0:
        return None

    grouped_config_paths = {}
    for log_dir in log_dirs:
        parts = log_dir.name.split('-')
        experiment_name = '-'.join(parts[1:])
        if experiment_name not in grouped_config_paths:
            grouped_config_paths[experiment_name] = []
        grouped_config_paths[experiment_name].append(log_dir / 'config.yml')

    if len(grouped_config_paths) > 1:
        config_paths = radiolist_dialog(
            values=[(value, key)
                    for key, value in sorted(grouped_config_paths.items())],
            text='Please select an experiment:').run()
        if config_paths is None:
            return None
    else:
        config_paths = next(iter(grouped_config_paths.values()))

    selected_config_path = radiolist_dialog(values=[(path, path.parent.name)
                                                    for path in config_paths],
                                            text='Please select a run:').run()
    if selected_config_path is None:
        return None

    return selected_config_path
def main():
    result = radiolist_dialog(
        values=[
            ('red', 'Red'),
            ('green', 'Green'),
            ('blue', 'Blue'),
            ('orange', 'Orange'),
        ],
        title='Radiolist dialog example',
        text='Please select a color:')

    print('Result = {}'.format(result))

    # With HTML.
    result = radiolist_dialog(
        values=[
            ('red', HTML('<style bg="red" fg="white">Red</style>')),
            ('green', HTML('<style bg="green" fg="white">Green</style>')),
            ('blue', HTML('<style bg="blue" fg="white">Blue</style>')),
            ('orange', HTML('<style bg="orange" fg="white">Orange</style>')),
        ],
        title=HTML('Radiolist dialog example <reverse>with colors</reverse>'),
        text='Please select a color:')

    print('Result = {}'.format(result))
def choose_category_synonym(item, hypernims, **kwargs):
    synonym = radiolist_dialog(
        values=make_labels(hypernims),
        title="Hypernims without category found",
        text=
        f"Which hypernim is synonymous with a category for the item '{item}'?",
    ).run()
    if not synonym:
        return

    known_categories = storage.get_known_categories()
    category = radiolist_dialog(
        values=make_labels(sorted(known_categories)),
        title=f"Choose category for '{synonym}'",
        text=f"Which category is '{synonym}' synonymous with?",
    ).run()
    if not category:
        category = input_dialog(
            title=f"Add a new category synonymous with '{synonym}'", ).run()
    if not category:
        category = input_dialog(
            title="Unknown category",
            text=f"What is the category for synonym '{item}'",
        ).run()
    if category:
        storage.add_category_synonym(synonym, category)

    return category
Beispiel #5
0
def delete_sector(path):
    """
    Delectes a sector from a zone
    """
    zones = load_zones(path)

    selected_zone = radiolist_dialog(
        values=[(zone, zone) for zone in zones],
        title='Select Zone',
        text='Please select a zone (use tab to move to confirmation buttons):')
    sectors = load_sectors(selected_zone, path)

    selected_sector = radiolist_dialog(
        # Remove extension by slicing
        values=[(sector, sector[:-4]) for sector in sectors],
        title='Select Sector',
        text=
        'Please select a sector to delete (use tab to move to confirmation buttons):'
    )

    # TODO: Replace by an easier selector dialog
    sure = radiolist_dialog(values=[(True, "Yes"), (False, "No")],
                            title='Select Sector',
                            text='Are you sure you want to delete ' +
                            selected_sector[:-4] + ' from ' + selected_zone +
                            '?')

    if sure:
        os.remove(path + DATA + ZONES + SEPARATOR + selected_zone + SECTORS +
                  SEPARATOR + selected_sector)
def main():
    result = radiolist_dialog(
        values=[
            ('red', 'Red'),
            ('green', 'Green'),
            ('blue', 'Blue'),
            ('orange', 'Orange'),
        ],
        title='Radiolist dialog example',
        text='Please select a color:').run()

    print('Result = {}'.format(result))

    # With HTML.
    result = radiolist_dialog(
        values=[
            ('red', HTML('<style bg="red" fg="white">Red</style>')),
            ('green', HTML('<style bg="green" fg="white">Green</style>')),
            ('blue', HTML('<style bg="blue" fg="white">Blue</style>')),
            ('orange', HTML('<style bg="orange" fg="white">Orange</style>')),
        ],
        title=HTML('Radiolist dialog example <reverse>with colors</reverse>'),
        text='Please select a color:').run()

    print('Result = {}'.format(result))
def suppressor_choice(file, screening):
    from prompt_toolkit.shortcuts import radiolist_dialog
    import os
    dirpath = os.path.basename(os.getcwd())
    proceed = radiolist_dialog(values=[(True, "Yes"), (False, "No"),
                                       (None, "No to All")],
                               title=dirpath,
                               text="Is this a suppressor screen?")
    if proceed:
        field = radiolist_dialog(values=[
            ("ValidatedSuppress", "ValidatedSuppress"),
            ('PutativeSuppress', 'PutativeSuppress')
        ],
                                 title=dirpath,
                                 text="Validated or Putative Suppressors?")
        with open(file) as fh:
            for line in fh:
                riga = line.rstrip().split("\t")
                if len(riga) > 2:
                    sample = riga[0]
                    aka = riga[1]
                    genotype = riga[2:]
                    gen = list(map(lambda x: (x, x), genotype))
                    gen.append(('unknown', 'unknown'))
                    result = radiolist_dialog(
                        values=gen,
                        title='Screening: ' + dirpath,
                        text='Please select the suppressor mutation for sample '
                        + aka + ' (' + sample + '):')
                    if result != None:
                        if result != 'unknown':
                            if field == "ValidatedSuppress":
                                update_suppressor_db(
                                    sample,
                                    valid_sup=result,
                                    all_suppressors=" ".join(genotype))
                            elif field == "PutativeSuppress":
                                update_suppressor_db(
                                    sample,
                                    proposed_sup=result,
                                    all_suppressors=" ".join(genotype))
                        else:
                            update_suppressor_db(
                                sample, all_suppressors=" ".join(genotype))
                    else:
                        break
    elif proceed == None:
        return ('NoToAll')
Beispiel #8
0
    def open_archive_from_dir(self, filename: str):
        """ opens another archive in the same dir that the original one was in """
        self.filename = filename
        dirname = os.path.dirname(self.filename)
        if not dirname:
            return False
        else:
            if not os.path.exists(dirname):
                raise ValueError(
                    f"Path {dirname} has gone missing while you were running this program."
                )
            filenames = []
            files = os.listdir(dirname)
            for filename in sorted(files):
                fullpath = os.path.join(dirname, filename)
                if os.path.exists(fullpath) and os.path.isfile(fullpath):
                    display_size = human_file_size(os.path.getsize(fullpath))
                    display_name = f"{display_size} {filename}"
                    filenames.append((fullpath, display_name))

            result = radiolist_dialog(
                title="Select a new archive to open...",
                #text="What do you want to do?",
                cancel_text="Cancel",
                values=filenames,
            ).run()
            if not result:
                logger.debug("No option selected")
                return False
            logger.debug(f"opening {result}")
            return self.__init__(result)
Beispiel #9
0
 def do_recluster(self, cluster):
     values = [("recluster", "Recluster"),
               ("keep", "Keep Cluster, Refine Types")]
     dialog = radiolist_dialog(
         values=values, text=f"Choose how to handle cluster {cluster}")
     res = dialog.run()
     return res == "recluster"
Beispiel #10
0
 def update_items(args):
     if len(args) == 0:
         raise ArgumentError("No arguments given!")
     else:
         if args[0] == "clear":
             from dsres.resources import clear_mod_items
             clear_mod_items(DarkSouls.ITEM_CATEGORIES)
             nest_reset()
         elif args[0] == "remove":
             from dsres.resources import remove_mod_item
             try:
                 remove_mod_item(args[1])
                 nest_remove(args[1])
             except IndexError:
                 raise ArgumentError("Item name not specified!")
         elif args[0] == "list":
             from dsres.resources import read_mod_items
             print(Fore.LIGHTBLUE_EX + "\n\tID\t\tName" + Fore.LIGHTYELLOW_EX)
             for item in read_mod_items():
                 item = item.split()
                 if len(item) == 4:
                     print("\t%s\t\t%s" % (item[0], DarkSouls.get_name_from_arg(item[3])))
             print(Fore.RESET)
         elif args[0] == "add":
             from dsres.resources import create_mod_files
             create_mod_files(DarkSouls.ITEM_CATEGORIES)
             category = radiolist_dialog(
                 title="Select item category",
                 text="Category of the new item:",
                 values=[(cat, cat.upper()) for cat in DarkSouls.ITEM_CATEGORIES.keys()]
             ).run()
             if category is None:
                 return False
             item_id = input_dialog(
                 title="Enter item ID",
                 text="Item ID for the new %s:" % category
             ).run()
             if item_id is None or not item_id.strip():
                 return False
             item_name = input_dialog(
                 title="Enter item name",
                 text="Name of the new %s:" % category
             ).run()
             if not item_name.strip():
                 return False
             from dsres.resources import write_mod_item
             formatted_name = "-".join(item_name.lower().split())
             try:
                 if write_mod_item(category, formatted_name, int(item_id)):
                     print(Fore.GREEN + ("%s '%s' (ID: %s) added successfully" % (
                         category.title(), item_name.title(), item_id)) + Fore.RESET)
                     nest_add([formatted_name])
                     return True
                 return False
             except ValueError:
                 raise ArgumentError("Can't convert %s '%s' to int!" % (type(item_id).__name__, item_id))
         else:
             raise ArgumentError("Unknown argument: %s" % args[0])
         return True
Beispiel #11
0
 def solve(self, question='', options=[]):
     radioOptions = list(map(lambda option: (option, option), options))
     answer = radiolist_dialog(
         values=radioOptions,
         title=question,
         text='Answer: ',
     ).run()
     return answer
Beispiel #12
0
def select_advantage(db):
    attributes = db['attributes']
    advantage = radiolist_dialog(title=f'Family advantage',
                                 text='Select a family advantage',
                                 values=list(zip(attributes,
                                                 attributes))).run()
    if advantage is None:
        sys.exit(1)  # cancel
    return advantage
Beispiel #13
0
def select_province(db, player):
    all_provinces = db['provinces']
    province_name = radiolist_dialog(
        title=f"{player['name']} decides his fate",
        text='Select a province',
        values=list(zip(all_provinces.keys(), all_provinces.keys()))).run()
    if province_name is None:
        sys.exit(1)  # cancel
    province = all_provinces[province_name]
    province['name'] = province_name
    return province
Beispiel #14
0
def lessons_app(title=LESSONS_MENU_TITLE, text=LESSONS_MENU_TEXT):
    values = list()
    for i,m in enumerate(LESSON_DATA):
        if is_module_completed(i):
            if len(m['lessons']) == 0: # empty module (chapter)
                c = 'magenta'
            else:
                c = 'green'
        else:
            c = 'red'
        values.append((i, HTML('<ansi%s>%s</ansi%s>' % (c,m['module_name'],c))))
    return radiolist_dialog(title=title, text=text, style=APP_STYLE, values=values)
Beispiel #15
0
def SelectVersion(versions):
    version_select_items = []

    # TODO(breakds): Read the current version from shell.nix if it exists.
    for label, version in versions:
        version_select_items.append(
            (version, HTML('Node.js <green>{}</green>'.format(label))))

    return radiolist_dialog(
        values=version_select_items,
        title=HTML('Select <skyblue>Node.js</skyblue> Version'),
        text='Available versions are')
Beispiel #16
0
def delete_zone(path):
    """
    Deletes a zone
    """
    zones = load_zones(path)

    selected_zone = radiolist_dialog(
        values=[(zone, zone) for zone in zones],
        title='Select Zone',
        text=
        'Please select a zone to delete (use tab to move to confirmation buttons):'
    )
Beispiel #17
0
 def ask_flag():
     flag_id = input_dialog(title="Enter a flag ID",
                            text="Event flag to listen to:").run()
     if flag_id is None or not flag_id.strip():
         raise ArgumentError("No flag ID specified!")
     if not flag_id.isnumeric():
         raise ArgumentError("Can't convert %s '%s' to int!" %
                             (type(flag_id).__name__, flag_id))
     state = radiolist_dialog(title="Select flag state",
                              text="Desired state of event flag %s" %
                              flag_id,
                              values=[(True, "ON"), (False, "OFF")]).run()
     if state is None:
         raise ArgumentError("No state specified!")
     return int(flag_id), state
Beispiel #18
0
def run_lesson_module(module_ind, text=LESSON_TEXT):
    if module_ind is None:
        return
    module = LESSON_DATA[module_ind]
    if len(module['lessons']) == 0:
        return message_dialog(title=HTML(module['module_name']), text=EMPTY_MODULE_TEXT, style=APP_STYLE).run()
    else:
        values = list()
        for i,l in enumerate(module['lessons']):
            if is_lesson_completed(module_ind,i):
                c = 'green'
            else:
                c = 'red'
            values.append((i, HTML('<ansi%s>%s</ansi%s>' % (c,l['lesson_name'],c))))
        return radiolist_dialog(title=HTML(module['module_name']), text=text, style=APP_STYLE, values=values).run()
Beispiel #19
0
def set_time_zone():
    """Select a timezone from a list of US-based time zones.

    :return: Time zone name based on pytz.
    """
    # TODO Allow for a select more option to get access to full list of Time Zones

    # Creates list of US Time Zones
    time_zone = list()
    for zone in pytz.common_timezones:
        if zone.startswith("US/"):
            time_zone.append((zone, zone))

    # Ask user to select time zone from list.
    return radiolist_dialog(values=time_zone,
                            title="Time Zone",
                            text="Please select assessment time zone:")
Beispiel #20
0
 def get_upgrade_value_infusable(infusions: list, item: DSRItem):
     infusion = radiolist_dialog(
         title="Select infusion type",
         text="How would you like %s to be upgraded?" % DarkSouls.get_name_from_arg(item.get_name()),
         values=infusions
     ).run()
     if infusion is None:
         return None
     upgrade = input_dialog(
         title="Enter upgrade value",
         text="Item type: Normal [%s]" % infusion.upper()
     ).run()
     try:
         int(upgrade)
     except ValueError:
         raise ArgumentError("Can't convert %s '%s' to int" % (type(upgrade).__name__, upgrade))
     return upgrade, infusion
Beispiel #21
0
def set_time_zone():
    """Select a timezone from a list of US-based time zones.

    Returns: Time zone name based on pytz.
    """
    # TODO Allow for a select more option to get access to full list of Time Zones
    # See issue: https://github.com/cisagov/gophish-tools/issues/49

    # Creates list of US Time Zones
    time_zone = list()
    for zone in pytz.common_timezones:
        if zone.startswith("US/"):
            time_zone.append((zone, zone))

    # Ask user to select time zone from list.
    return radiolist_dialog(
        values=time_zone, title="Time Zone", text="Please select assessment time zone:"
    ).run()
Beispiel #22
0
def main_menu(data_object: AlltheData):
    """ prompts for the main menu """
    result = radiolist_dialog(
        title="TARMunger",
        text=
        f"What do you want to do?\n\nCurrent file: {data_object.filename}\nSize: {data_object.get_file_size()}",
        cancel_text="Quit",
        values=[
            ("prompt_top50", "Select from the Top50"),
            ("show_file_filters", "Show the list of files selected"),
            ("regex_filter", "Add a regex filter"),
            ("show_regexes", "Show the regex filters"),
            ("write_file", "Write archive"),
            ("move_stripped_over_original",
             "Move stripped archive over original and reload"),
            ("open_archive", "Open another archive"),
        ]).run()
    return result
Beispiel #23
0
def main():
    setup_method = radiolist_dialog(
        values=[
            (0, 'Quick Setup (recommended)'),  # automatic setup
            (1, 'Ultra Setup (no questions)'),  # automatic setup, file mode
            (2, 'Manual (not recommended)')  # classic setup
        ],
        title='Welcome to JMK OS',
        text='How would you like to setup JMK OS?')
    if setup_method == 0:
        # UINFO variables
        new_password = ""
        new_2_password = ""
        pass_loop = True
        new_username = ""

        # ask for username and password
        new_username = input_dialog(title='Welcome to JMK OS',
                                    text='Please type a username to continue:')
        while pass_loop:
            new_password = input_dialog(title='Welcome to JMK OS',
                                        text='Please type a password:'******'Welcome to JMK OS',
                                          text='Confirm the password:'******'JMK OS 2.0',
                    text='Invalid passwords given.',
                    buttons=[('Retype', True)],
                )

    elif setup_method == 1:
        os.system('cls' if os.name == 'nt' else 'clear')
    elif setup_method == 2:
        os.system('cls' if os.name == 'nt' else 'clear')
    else:
        os.system('cls' if os.name == 'nt' else 'clear')
        print("Error loading JMK Setup. You must reinstall JMK OS.")
Beispiel #24
0
    def cmd_tui(self, args: argparse.Namespace):
        self.logger.info("start terminal ui")
        selection = checkboxlist_dialog(
            title="Select simulations",
            text="Select simulations to run operations on.",
            values=[(i, repr(combination))
                    for i, combination in enumerate(self.combinations)],
        ).run()

        if not selection:
            self.logger.info("no simulations selected, nothing to do")
            return

        self.logger.info("selected %d simulation(s)", len(selection))

        operation = radiolist_dialog(
            title="Select operation",
            text="Select operation to run on selected simulations",
            values=[("remove", "remove")],
        ).run()

        if not operation:
            self.logger.info("no operation selected, nothing to do")
            return

        self.logger.info(
            'running operation "%s" on %d simulation(s)',
            operation,
            len(selection),
        )

        if operation == "remove":
            cmd = [
                sys.executable,
                Path(get_main_path()).resolve(),
                "remove",
                ",".join(str(i) for i in selection),
            ]
            self.logger.info("command: %s", str(cmd))
            subprocess.run(cmd)
Beispiel #25
0
def label(ctx, ds_path, level):
    """
    Export specific label from a ZarrDataset.
    \f

    Args:
        ds_path (str): path to the dataset
    """

    show_trace = logger.getEffectiveLevel() <= logging.DEBUG
    ds = open_dataset(ds_path, show_trace=show_trace)

    if not isinstance(ds, ZarrDataset):
        raise TypeError("input is not a ZarrDataset")

    labels = ds.labels
    if len(labels) < 2:
        if len(labels) == 1:
            desc = "Only a single label exists in this dataset.\n"
        else:
            desc = "Cannot find a valid label (something very wrong?)\n"
        message_dialog(title="Unable to export label", text=desc).run()
        return

    values = [(label, ) * 2 for label in labels]
    label = radiolist_dialog(
        title="Found multiple labels",
        text="Which label would you like to export?",
        values=values,
    ).run()

    if label is None:
        logger.info("cancelled")
        return

    # reload dataset
    logger.info(f'reload dataset with default label "{label}"')
    ds = open_dataset(ds_path, label=label, show_trace=show_trace)
Beispiel #26
0
from prompt_toolkit.shortcuts import message_dialog, radiolist_dialog

response = radiolist_dialog(
    title="Zadání příkazu",
    text="Zadejte příkaz (quit, exit, help, eval):",
    values=[("quit", "Quit"), ("exit", "Exit"), ("help", "Help"),
            ("eval", "Eval")],
)

if response is not None:
    message_dialog(
        title="Zadání příkazu",
        text="zadali jste: {command}".format(
            command=response if response else "nic :)"),
    )
else:
    message_dialog(title="Zadání uživatelského jména",
                   text="Příkaz nebyl zadán")
Beispiel #27
0
from tableau_du_courant import tableau_courant
from derive_courant import derive_courant
from derive_vent import derive_vent
import math

def custom_input(title):
    return input_dialog(
        title='Bateau',
        text=title
    ).run()

result = radiolist_dialog(
    title="Que voulez-vous faire ?",
    values=[
        ("hauteur_eau", "Hauteur d'eau"),
        ("trouver_destination", "Trouver le cap pour une destination"),
    ],
    ok_text="Suivant",
    cancel_text="Fermer"
).run()

if result is "hauteur_eau":
    # print("Hauteur d'eau (m): "+Hauteur_eau(
    #     float(custom_input("Hauteur de la marée haute (m)")),
    #     float(custom_input("Hauteur de la basse mer (m)")),
    #     ...[float(x) for x in custom_input("Moment de début de la montée (HH:mm)").split(":")],
    #     float(custom_input("Moment de la fin de la montée (HH:mm)")),
    #     float(custom_input("------------------------------------\nMoment souhaité (HH:mm)")),
    # ))
    print("Not implemented")
elif result is "trouver_destination":
Beispiel #28
0
def promote_file_selection_dialog(filenames: List[str]):
    return radiolist_dialog(title=TITLE,
                            text="请选择被处理的xlsx文件",
                            values=[(name, name) for name in filenames],
                            ok_text="确定",
                            cancel_text="取消").run()
Beispiel #29
0
        try:
            int(text)
            if int(text) < 5:
                raise ValidationError(
                    message="Please enter a valid integer greater than 5", cursor_position=document.cursor_position)
        except:
            raise ValidationError(
                message="Please enter a valid integer greater than 5", cursor_position=document.cursor_position)


print("Welcome to Quizzer")

message_dialog(title="Welcome to Quizzer",
               text="Press OK to continue.").run()

difficulty = radiolist_dialog(
    title="Difficulty", text="Which difficulty would you like to choose?", values=[("Easy", "Easy"), ("Medium", "Medium"), ("Hard", "Hard"), ("Impossible", "Impossible")]).run()

question_numbers = input_dialog(
    title="Number of questions", text="How many questions would you like to be asked", validator=NumberValidator()).run()

# Ask questions required to start the quiz
# initial_questions = prompt([{
#     # We want to know how much of a challenge the user wants and adjust questions accordingly
#     # We have a set few choices which we want the user to choose so we set the type to list
#     "type": "list",
#     "message": "Which difficulty would you like to choose?",
#     "choices": ["Easy", "Medium", "Hard", "Impossible"]
# }, {
#     # We want to know how many questions the user wants
#     "type": "input",
#     "validate": NumberValidator(),
Beispiel #30
0
 def radio_list(self, title, text, options) -> str:
     ret = radiolist_dialog("Select a " + title + ":", text, values=options)
     print("user selected:", ret)
     return ret
Beispiel #31
0
def select_network(log):
    # Prompt for the selection on which network to perform the installation

    unknown_joining_queue = '(No join queue information found)'

    network_queue_info = {
        NETWORK_MAINNET: unknown_joining_queue,
        NETWORK_PRATER: unknown_joining_queue
    }

    headers = {'accept': 'application/json'}

    async def network_joining_validators(network):
        async with httpx.AsyncClient() as client:
            beaconcha_in_queue_query_url = (BEACONCHA_IN_URLS[network] +
                                            BEACONCHA_VALIDATOR_QUEUE_API_URL)
            try:
                response = await client.get(beaconcha_in_queue_query_url,
                                            headers=headers,
                                            follow_redirects=True)
            except httpx.RequestError as exception:
                log.error(
                    f'Exception: {exception} while querying beaconcha.in.')
                return None

            if response.status_code != 200:
                log.error(
                    f'Status code: {response.status_code} while querying beaconcha.in.'
                )
                return None

            response_json = response.json()

            if (response_json and 'data' in response_json
                    and 'beaconchain_entering' in response_json['data']):
                validators_entering = int(
                    response_json['data']['beaconchain_entering'])
                waiting_td = timedelta(days=validators_entering / 900.0)

                queue_info = (
                    f'({validators_entering} validators waiting to join '
                    f'[{humanize.naturaldelta(waiting_td)}])')
                return network, queue_info

        return None

    async_tasks = []

    for network in network_queue_info.keys():
        async_tasks.append(network_joining_validators(network))

    loop = asyncio.get_event_loop()
    results = loop.run_until_complete(asyncio.gather(*async_tasks))

    for result in results:
        if result is None:
            continue
        network, queue_info = result
        network_queue_info[network] = queue_info

    result = radiolist_dialog(
        title='Network selection',
        text=('''
This wizard supports installing and configuring software for various
Ethereum networks. Mainnet is the main network with real value. The others
are mostly for testing and they do not use anything of real value.

Joining a beacon chain network as a validator can take extra time if many
validators are trying to join at the same time. The amount of validators in
the join queue and the estimated time is displayed below for each network.

For which network would you like to perform this installation?

* Press the tab key to switch between the controls below
'''),
        values=[(NETWORK_MAINNET,
                 f'Mainnet {network_queue_info[NETWORK_MAINNET]}'),
                (NETWORK_PRATER,
                 f'Prater {network_queue_info[NETWORK_PRATER]}')],
        ok_text='Use this',
        cancel_text='Quit').run()

    return result