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}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chopt-0.0.5.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chopt-0.0.5-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file chopt-0.0.5.tar.gz.

File metadata

  • Download URL: chopt-0.0.5.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for chopt-0.0.5.tar.gz
Algorithm Hash digest
SHA256 44365fc623ed72cb5da2befd4288714d5cb44c57057e10509e1be5610a8f867b
MD5 42d568cc3785194101bdc09d99daec51
BLAKE2b-256 a7e1d81a93be137bcddb92ff3878d5cb2543803cf4cb8ee95a367bc5a80c9aa0

See more details on using hashes here.

File details

Details for the file chopt-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for chopt-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a4311a2a213beb545e7d1a88fedfd6e21c18fb63d11956960e2e71d5b4ac37
MD5 124b941e8b72a8a562ca55d671346235
BLAKE2b-256 3f6565581a7b3dfe85b8f5710fed560bb6a888d0054b539fe8a7da5eb3c689cd

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.6

2 files

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page