Skip to main content

pick an option in the terminal with a simple GUI

Project description

pick is a small python library to help you create curses based interactive selection list in the terminal. See it in action:

[![asciicast](https://asciinema.org/a/33923.png)](https://asciinema.org/a/33923)

### Installation

$ pip install 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)

#### Options

  • options: a list of options to choose from

  • title: (optional) a title above options list

  • indicator: (optional) custom the selection indicator

  • default_index: (optional) set this if the default selected option is not the first one

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pick-0.2.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

pick-0.2.0-py2.py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page