Simple Term Menu with support for another print
Project description
fork of https://github.com/IngoMeyer441/simple-term-menu 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 = terminal_menu.show()
print(f"You have selected {options[menu_entry_index]}!")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for rich_simple_term_menu-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff5f11b47625e3cc3da8bdea2fb3c8eca2af28bc26d88be78b377ee119e0f6a |
|
MD5 | 8cdbf025b36342ec6911c31b0228b0ff |
|
BLAKE2b-256 | f679731d830c66c54b19defc78e48d5ce1c135aecb66e99f5a8fbdf0499d926b |
Close
Hashes for rich_simple_term_menu-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d11f6ab3caf0d02f8008d95909576b9e07e82b40ca31ae270194d28bf2ad25c9 |
|
MD5 | 9991af6768223bdd90e11fe4a8bd6b43 |
|
BLAKE2b-256 | 8267d256b3ff4feab38f1128284689d79e3d304a2cea7e189a9ff29a71ccab95 |