alice1017 / SelectMenu

SelectMenu is the input form to choose from menu by arrow keys.
MIT License
22 stars 10 forks source link
prompt-toolkit python2 selectmenu

SelectMenu

forthebadge

demo

:page_facing_up: Overview

SelectMenu is the input form to choose from menu by arrow keys.

SelectMenu powered by python-prompt-toolkit.

:pencil2: Usage

>>> from selectmenu import SelectMenu
>>> menu = SelectMenu()
>>> menu.add_choices(
...    ["Python", "Ruby", "Javascript", "HTML", "CSS"])
>>> result = menu.select("What language do you like?")
What language do you like? (Use arrow keys)
 > Python
   Ruby
   Javascript
   HTML
   CSS
>>> print result
Python

:inbox_tray: Installation

$ git clone git@github.com:alice1017/SelectMenu.git
$ cd SelectMenu
$ python setup.py build install

or

$ pip install SelectMenu

:eyes: Contribution

  1. Forks on Github
  2. Find a bug? Send a pull request to get it merged and published.