quick-menu 0.6.0

Last updated:

0 purchases

quick-menu 0.6.0 Image
quick-menu 0.6.0 Images
Add to Cart

Description:

quickmenu 0.6.0

quick-menu



This is a simple package to create text menus for use in console applications.
Usage
A menu can be created quickly that can call a function with or without a value. An exit
item is automatically added to the menu.
Create a Quick Menu
from quick_menu.menu import Menu, MenuItem

def func(val=1):
print("func1: val =", val)
input("Press [Enter] to continue")

menu = Menu(
"Simple Menu",
menu_items=[
MenuItem("1", "Func default", action=func),
MenuItem("2", "Func with val=4", action=func, action_args={"val": 4}),
]
)

menu.run()

Output
============== Simple Menu =============
1: Func default
2: Func with val=4
X: Exit
========================================
>> 1
func1: val = 1
Press [Enter] to continue

============== Simple Menu =============
1: Func default
2: Func with val=4
X: Exit
========================================
>> 2
func1: val = 4
Press [Enter] to continue

Documentation
The documentation is made with Material for MkDocs and is hosted by GitHub Pages.
Installation
pip install quick-menu

License
quick-menu is distributed under the terms of the MIT license.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.