def run_menu():
    """
    This launches an interactive menu.

    """
    while True:
        # menu loop

        print(MENU)
        inp = input(" option > ")

        # quitting and help
        if inp.lower() == 'q':
            return
        elif inp.lower() == 'h':
            print(HELP_ENTRY)
            input("press <return> to continue ...")
            continue
        elif inp.lower() in ('v', 'i', 'a'):
            print(show_version_info(about=True))
            input("press <return> to continue ...")
            continue

        # options
        try:
            inp = int(inp)
        except ValueError:
            print("Not a valid option.")
            continue
        if inp == 1:
            # start everything, log to log files
            server_operation("start", "all", False, False)
        elif inp == 2:
            # start everything, server interactive start
            server_operation("start", "all", True, False)
        elif inp == 3:
            # start everything, portal interactive start
            server_operation("start", "server", False, False)
            server_operation("start", "portal", True, False)
        elif inp == 4:
            # start both server and portal interactively
            server_operation("start", "server", True, False)
            server_operation("start", "portal", True, False)
        elif inp == 5:
            # reload the server
            server_operation("reload", "server", None, None)
        elif inp == 6:
            # reload the portal
            server_operation("reload", "portal", None, None)
        elif inp == 7:
            # stop server and portal
            server_operation("stop", "all", None, None)
        elif inp == 8:
            # stop server
            server_operation("stop", "server", None, None)
        elif inp == 9:
            # stop portal
            server_operation("stop", "portal", None, None)
        else:
            print("Not a valid option.")
            continue
        return
dataset/ETHPy150Open evennia/evennia/evennia/server/evennia_launcher.py/run_menu/original