CHOOSE OPTIONS
A simple CLI checkbox menu interface for choosing options.
Takes a list of options as an argument and returns a list of selected items from that list.
Options are chosen by entering their corresponding number (including specifying ranges in the form 1..5 or 1-5), or using globbing to match option strings.
INSTALLATION
pip install chopt
CLI USAGE
usage: chopt [-h] options [options ...]
Create a checkbox menu from a list of options.
positional arguments:
options Options for the menu.
optional arguments:
-h, --help show this help message and exit
PYTHON USAGE
from chopt import chopt
my_list = [ 'item1', 'item2', 'item3' ]
chosen = chopt(my_list)
some_interesting_function(chosen)
EXAMPLES
chopt $(ls ~/src/chopt)
chopt $(tail -n 10 /usr/share/dict/words)
chopt options{1..12}
Release files for chopt 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chopt-0.0.5.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chopt-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / chopt-0.0.5.tar.gz
| Download URL | chopt-0.0.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44365fc623ed72cb5da2befd4288714d5cb44c57057e10509e1be5610a8f867b
|
|
BLAKE2b-256 checksum How to use checksums |
a7e1d81a93be137bcddb92ff3878d5cb2543803cf4cb8ee95a367bc5a80c9aa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / chopt-0.0.5-py3-none-any.whl
| Download URL | chopt-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6a4311a2a213beb545e7d1a88fedfd6e21c18fb63d11956960e2e71d5b4ac37
|
|
BLAKE2b-256 checksum How to use checksums |
3f6565581a7b3dfe85b8f5710fed560bb6a888d0054b539fe8a7da5eb3c689cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |