A simple Python menu in the terminal using curses. Ideal for people who want to quickly make a menu without writing their own complicated crutches. Includes: SelectorMenu, MultipleSelectorMenu, FunctionalMenu.
- using pip
$ pip install PyConsoleMenu
- using GitHub (требуется git)
$ git clone https://github.com/BaggerFast/PyConsoleMenu
$ cd PyConsoleMenu
$ pip install -r requirements.txt
- Docs in code
- Type hints
from PyConsoleMenu import MultiSelectorMenu, FunctionalOption, SelectorMenu, FunctionalMenu
def multi_selector():
menu = MultiSelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='MultiSelector', count=3)
ans = menu.input()
print(ans)
def selector():
menu = SelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='Selector')
ans = menu.input()
print(ans)
def functional():
data = [
FunctionalOption('Cheburashka', lambda: print('I am a Parrot')),
FunctionalOption('Parrot', lambda: print('I am a Cheburashka')),
]
menu = FunctionalMenu(data, title='Functional')
ans = menu.input()
ans()
Was written in these videos on YouTube 👀
Video#1
Stream#1
Stream#2