Skip to main content

CHOOSE OPTIONS

A simple CLI checkbox menu interface for choosing options.

img

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)

Source distribution for chopt 0.0.5
File Size Uploaded
chopt-0.0.5.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chopt 0.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

0.0.6

2 release files

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page