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.5.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file pick-0.5.0.tar.gz
.
File metadata
- Download URL: pick-0.5.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92cb060e6dfcb4a3edd6a1493da615db49fd875f2cd29e3e877bc6507f587585 |
|
MD5 | b70457bf4c5a157349d3d48f3b7246c9 |
|
BLAKE2b-256 | bb807194032ec0a398f7cd7a10935b0d404d54ed2dd4d931cd268c12d5da100c |
File details
Details for the file pick-0.5.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pick-0.5.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 | 9ae8bb5ca083916b5cbdaf03a1f05cb757bd66691ccc4edae2076f4e51c837d8 |
|
MD5 | 8cdace2d3776098178505e69112b4387 |
|
BLAKE2b-256 | 43e2474feddee6a83c62b7689f59fd991d433d8827375e2403ded0482c312641 |