Skip to main content

Choose Options using a CLI Checkbox Menu

Project description

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 using wildcards/globbing to match entries.

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)

img

img

chopt option1 option2 option3

img

img

Project details


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.3.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

chopt-0.0.3-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page