Skip to main content

Miniscule Python Module for multiple choice menus using arrow keys

Reason this release was yanked:

Fatal Error

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.2.tar.gz (3.0 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.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: multichoicelib-0.0.2.tar.gz
  • Upload date:
  • Size: 3.0 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.2.tar.gz
Algorithm Hash digest
SHA256 7e1eccad03bcf3cd8cb4aada1254210e8a5d1c4ee165a7aa6718b6c3f0c813f6
MD5 09662062926f75174254126e64a7c130
BLAKE2b-256 9c19d168cb3bafe8020ef595e596a7bda42522111c579068e88f31dadd3b446e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: multichoicelib-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f89f6e7900751226337e0472726078c16405ac91630e892486c7876f6cb7df03
MD5 25a65eb29b5dc1ad86c05e15650b56c9
BLAKE2b-256 ae77237c0bfda39acbea8204537217c6416e6bbe4320c023e986a3f574566aee

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