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, font_effects=[]):
| 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) |
| font_effects | list or tuple | Not required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none 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, font_effects=[]):
| 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 |
| font_effects | list or tuple | Not required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none 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, font_effects=[]):
| 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) |
| max_choices | integer | Not required. The maximum 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) |
| font_effects | list or tuple | Not required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inputselect-1.0.tar.gz.
File metadata
- Download URL: inputselect-1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3083d91555e6b6722444c4421d809bb0433f5493c984841f419a62cf16643a24
|
|
| MD5 |
ba1cfe8c300fe3a0de155cb80fae63d1
|
|
| BLAKE2b-256 |
7e32477788c5a095781299d1698f7e94f34961b2b3a341fd2b39998501a4efda
|
File details
Details for the file inputselect-1.0-py3-none-any.whl.
File metadata
- Download URL: inputselect-1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db949521728f44c781f86d7d1881ca43c7d111fd0d0fb20e551ad4a5b97f7d0
|
|
| MD5 |
90d94d6b7282a71f5ae3104c7aaaaf46
|
|
| BLAKE2b-256 |
fe9b9a43fde46325a70696a75ad76ca8c9000bf5205e0489b2c8928e17f6ecf5
|