Pick an option in the terminal with a simple GUI
Maintained. Last release 9 months ago. Weaker on release cadence.
pip install pickpick
pick is a small python library to help you create interactive selection list in the terminal.
| Basic | Multiselect |
|---|---|
![]() | ![]() |
Installation
$ pip install pick
Optional: blessed backend
pick uses the curses backend by default. If you prefer using
blessed, install the optional extra:
$ pip install "pick[blessed]"
Then pass backend="blessed" to pick(...).
Usage
pick comes with a simple api:
>>> from pick import pick
>>> title = 'Please choose your favorite programming language: '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> option, index = pick(options, title)
>>> print(option)
>>> print(index)
outputs:
>>> C++
>>> 4
pick multiselect example:
>>> from pick import pick
>>> title = 'Please choose your favorite programming language (press SPACE to mark, ENTER to continue): '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> selected = pick(options, title, multiselect=True, min_selection_count=1)
>>> print(selected)
outputs:

