Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multichoicelib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multichoicelib

Miniscule Python Module for multiple choice menus using arrow keys

  • 0.0.3
  • Source
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc