Skip to main content

Miniscule Python Module for multiple choice menus using arrow keys

Project description

MultiChoiceLib

MultiChoiceLib is a one-day project, meaning that it was literally written in a day. As you can imagine, it has not extensively been tested for bugs, and it does not work at all on machines which cannot run bash.

Usage:

from multichoicelib import MultiChoice

query = MultiChoice("Pick one:", ["apples", "cherries"])
    .wAccentColor("\033[33m") # yellow
    .wQuestionPrefix("\033[4m") # underline, don't override
    .wAnswerPrefix("] ", True) # override params are optional and default to false
    .wSelectedPrefix(") ", True) # if false, will append instead
    .addOption("oranges")() # evaluate

print(query.index, query.value)

Result:

GIF image of result

Warp terminal with Grafbase theme

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

multichoicelib-0.0.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

multichoicelib-0.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file multichoicelib-0.0.3.tar.gz.

File metadata

  • Download URL: multichoicelib-0.0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for multichoicelib-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a2bac6e489d8f4393d3926243e614c16d4425f5e8afcb900b5150093afd24465
MD5 48b5ddd8dd7cad1366af9cd59eeeb1ab
BLAKE2b-256 430a9203cb72a521a311b4f91cacab42b7d69d42482ea74730185ad78a1e2b62

See more details on using hashes here.

File details

Details for the file multichoicelib-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: multichoicelib-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for multichoicelib-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58399b8461718aad7b483830dce9f3308a62a19b8fcbeb58b85205507735da98
MD5 b4eaa970e6d93fdae836b6fdab9fab9f
BLAKE2b-256 1f8bdee125dd2ede35be803fee81b7e62610efd510b571b34fb49cef6aaaa8e8

See more details on using hashes here.

Supported by

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