Python menu for CLI
Project description
PyCLIMenu
CLI Menu module for Python.
Usage
Standard usage
import menu
main_menu = menu.Menu("Main Menu")
main_menu.add_items({
"Option 1": callback_1,
"Option 2": callback_2
})
main_menu.display()
Alternatively...
import menu
menu.BasicMenu("Main Menu", {
"Option 1": callback_1,
"Option 2": callback_2
})
Option menu
import menu
color_menu = menu.OptionMenu("Color")
red = (255, 0, 0)
green = (0, 255, 0)
blue = (0, 0, 255)
color_menu.add_items({
"Red": red,
"Green": green,
"Blue": blue
})
color = color_menu.display()
Alternatively...
import menu
color_menu = menu.BasicOptionMenu("Color", {
"Red": (255, 0, 0),
"Green": (0, 255, 0),
"Blue": (0, 0, 255)
})
color = color_menu.selection
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 climenu_pkg_baely-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9400f8493fa56ddfc55f99096defae94db7f4e735dd1e688ed8f7c576249f7cc |
|
MD5 | 845be86e5a1f0406ea2ea0a312c91d06 |
|
BLAKE2b-256 | 7306253f7709fa793c4fb22d95edab6a6a862a2c1d748a9c12667fc5c628cf97 |