Skip to main content

Simple Term Menu with support for another print

Project description

fork of but add a new parameter: print_entry_fn

This parameter allow you to control how to print each entry.
example: use rich to print text

from rich_simple_term_menu import TerminalMenu
from rich.console import Console

console = Console()

options = ["[bold gold1]entry 1", "entry 2", "entry 3"]

# Add the new `print_entry_fn` to control how to print each entry! 
terminal_menu = TerminalMenu(options, print_entry_fn=lambda x: console.print(x, end=''))

menu_entry_index =
print(f"You have selected {options[menu_entry_index]}!")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rich_simple_term_menu-0.1.0.tar.gz (18.7 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page