Skip to main content

A Python module for selecting options in the Python interactive terminal.

Project description

INPUTSELECT

"inputselect" is a tool for selecting options on the Python command line. "inputselect" works by only presenting the user with the options that the developer wants them to pick, and forces them to choose before moving on. It eliminates the hassle of trying to get the user to choose only from a set of specific options, and fixes the trouble with typos and repeat loops.

API Reference

Allow the user to select options horizontally in the Python interactive terminal.

inputselect.List(message: str = "", choices=None, separator: str = " ", spin_speed: int = 0, colors=DEF_COLORS, underline=False):
Parameter Type Description
message string Not required. The message that the user sees before the options are presented to them.
choices list or tuple Required. The choices to be displayed on the terminal.
separator string Not required. The string that separates each option.
spin_speed integer Not required. The speed at which the choices spin (spins the display forwards if x>0, backwards if x<0, and lets the user choose if x=0)
colors list or tuple Not required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
underline boolean Not required. Whether or not to underline of the option the user currently rests on (False by default)

Allow the user to select options in a sort of vertical slider in the Python interactive terminal.

inputselect.Slider(message: str = "", choices=None, spin_speed: int = 0, colors=DEF_COLORS, wrap=True, underline=False):
Parameter Type Description
message string Not required. The message that the user sees before the options are presented to them.
choices list or tuple Required. The choices to be displayed on the terminal.
spin_speed integer Not required. The speed at which the choices spin (spins the display forwards if x>0, backwards if x<0, and lets the user choose if x=0)
colors list or tuple Not required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
wrap boolean Not required. Whether or not to give the slider a wrap-around feature
underline boolean Not required. Whether or not to underline of the option the user currently rests on (False by default)

Allow the user to check and uncheck options in the Python interactive terminal.

inputselect.Checkbox(message: str = "pick an animal: ", choices=None, separator: str = " ", min_choices=2, colors=DEF_COLORS, alt_colors=ALT_COLORS, underline=False):
Parameter Type Description
message string Not required. The message that the user sees before the options are presented to them.
choices list or tuple Required. The choices to be displayed on the terminal.
separator string Not required. The string that separates each option.
min_choices integer Not required. The minimum amount of choices for the user to pick before they can exit (by default it is set to 2)
colors list or tuple Not required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
alt_colors list or tuple Not required. The respective colors of the text and bg of the option(s) the user has selected (yellow text and no bg by default)
underline boolean Not required. Whether or not to underline of the option the user currently rests on (False by default)

AUTHORS

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

inputselect-0.8.6.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

inputselect-0.8.6-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file inputselect-0.8.6.tar.gz.

File metadata

  • Download URL: inputselect-0.8.6.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for inputselect-0.8.6.tar.gz
Algorithm Hash digest
SHA256 0d816dabe3a77b8a27f42ee26db9166c7c9cf1511f5dd8b5d32631e7704c9088
MD5 12ab8d81cc093e94cafb3adc67c7d033
BLAKE2b-256 ec3b951ce75e9efd9fc32ef1675e83d136c5dbe64b3d45040012ed41f7f82061

See more details on using hashes here.

File details

Details for the file inputselect-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: inputselect-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for inputselect-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 898cf715802c0ef530d04c077ed259bbbedd1c95a78c6cf3e5f688d2958a176c
MD5 ac5a7f195176d2188ef4f2237eac783d
BLAKE2b-256 cc3af8d18aee191033351c3d20a2627268a8a66f0158dec06e0887f960ae380b

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