Write simple UI for your code in seconds in a unified way using Easy TTUI Menus
Project description
Easy TTUI Menus
About
Write simple UI for your code in seconds in a unified way using Easy TTUI Menus
Installation
Run pip3 install easyttuimenus from your preferred environment.
Usage
List Menu
list_menu(prompt: str, options: list)
Use when you have a list of possible valid options.
Parameters
prompt: Information to give to the user
opitons: The list of options to select
Returns
An index from options
Example Usage
import easyttuimenus
prompt = "Pick one of these"
options = ["lorem", "ipsum", "lorem ipsum"]
choice = easyttuimenus.list_menu(prompt, options)
print(options[choice]) # selected item from options
Int Menu
Use when you want to take an integer value as input.
Parameters
prompt: Information to give to the user
opitons: A list containing a minimum and maximum value
Returns
An integer value
Example Usage
import easyttuimenus
min_and_max = [0, 10]
prompt = "Pick a value between 0 and 10"
user_input = easyttuimenus.int_menu(prompt, min_and_max)
print(user_input) # user selected number
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters