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 or name. Multiple options can be selected in one go. Choices should be separated by spaces.
Also supported is specifying ranges of numbers, in the form x..y or x-y (where x and y are item numbers from the list, eg) 1..5 or 1-5).
Additionally you can use ..x or -x to specify everything up to the number x, and x.. or x- to specify everything from the number x until the last element.
Finally one can use wildcard globbing to match option name strings. For instance *.py would match all files with the extension .py.
Reserved words are toggle, reset, accept and quit (case insensitive). They can be used to carry out those respective actions. Typing just the first letter also carries out that action - ie) t, toggles all, r, resets, etc.
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 $(shuf -n 100 /usr/share/dict/words)
chopt options{1..100}
Metadata
Release files for chopt 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chopt-0.0.6.tar.gz | 4.3 kB | Without provenance | Details for chopt-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chopt-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for chopt-0.0.6-py3-none-any.whl |
Total release size: 9.2 kB
Release files / chopt-0.0.6.tar.gz
| Download URL | chopt-0.0.6.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f748809a12c15ea6294b7a36c6e52be38fa7dffb38b0338dd528136df5e761c9
|
|
BLAKE2b-256 checksum How to use checksums |
2d4540fdb750386d42e8a1c818923e09ba405f9dbbb9a780d3bbc33578e1efba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0
|
Release files / chopt-0.0.6-py3-none-any.whl
| Download URL | chopt-0.0.6-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29c0a7291a1b3e1e1f97a1673318bc482f302c2c6e883dac41ad0fde556810f5
|
|
BLAKE2b-256 checksum How to use checksums |
0d4c33966dfe7e47ce59c7a2a083cd2d6715387b15a1d29b808e685652c436cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0
|
Security for chopt 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.