pick an option in the terminal with a simple GUI
Project description
pick [![Build Status](https://travis-ci.org/wong2/pick.svg?branch=master)](https://travis-ci.org/wong2/pick)
====
**pick** is a small python library to help you create curses based interactive selection
list in the terminal. See it in action:
![Demo](example/basic.gif?raw=true)
### 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, defaults to *
* `default_index`: (optional) set this if the default selected option is not the first one
====
**pick** is a small python library to help you create curses based interactive selection
list in the terminal. See it in action:
![Demo](example/basic.gif?raw=true)
### 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, defaults to *
* `default_index`: (optional) set this if the default selected option is not the first one
Project details
Release history Release notifications | RSS feed
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.4.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file pick-0.4.0.tar.gz
.
File metadata
- Download URL: pick-0.4.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4508a5055043848f4ad0b0b40bf09805ae865a71e6ca68b6a70075110d03b4e2 |
|
MD5 | f7bee518d1c0306c9e2aef2d6d36576e |
|
BLAKE2b-256 | ef97d312157b27097aea8ae9bbbad0b4a71e7ec83fd7585b479b17127a9d717a |
File details
Details for the file pick-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pick-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b611cccc45055e66e8db3a1a9763182c23c33e328727fe8576f31e3968794d2 |
|
MD5 | 7dc359d7c3a67d07f0693b2f4a098ea5 |
|
BLAKE2b-256 | 64c11c46251c724a1735845cd71321f4da8b783b8b938595bee4a17f43201077 |