Python Command Line Menu Selector (PyCoLiMS)
A command line menu, designed for single stage selection. Displays a given list on screen for user to select, either in single or multi mode. Returns selected item/s to the calling function in the same format as provided.
If given a dictionary, pycolims will return key/s, allowing easy user input to call a dict value
In the case of lists too large to display at once, pycolims breaks the list down into terminal-sized chunks, with a paging system to cycle between the chunks
* It's a series of pointers, not a bunch of new lists. Pycolims tries to stay memory friendly!
Installation
pip install pycolims
Single Selection menu
import pycolims
menu_single = pycolims.Single()
menu_single.run(array_in, header: str="")
A single selection menu will display items on screen and return a single user selected value This can be a single item or one nested list from a given matrix
Multi Selection Menu
import pycolims
menu_multi = pycolims.Multi()
menu_multi.run(array_in, header: str="")
When a multi pycolims is used, the menu returns the entire given array with each item converted to a list, where [0] is a boolean indicating selection
>>> list_with_booleans = menu_multi.run([0, 1, '2'])
# User selects first and last options...
>>> print(list_with_booleans)
[[True, 0], [False, 1], [True, '2']]
Multi pycolims can also parse a given list in similar format to display items 'already selected'
prev_settings = [[True, 'val_one'],
[False, 'val_two']]
Pycolims menu options
Each pycolims menu has a series of commands at the bottom
Single menu options
(-) Prev Page
(+) Next Page
(!!) Break
Multi Menu Options
(-) Prev Page
(+) Next Page
(**) Select All (//) Clear All (><) Flip All (..) Return Selected (!!) Break
(-) Prev Page (+) Next Page
Cycles through available pages
(!!) Break
Easy back out for end user use; throws a Keyboard interrupt error to interrupt code
(**) Select All (//) Clear All
Selects/Clears ALL available items
(><) Flip All
Inverts all item selections
(..) Return Selected
Finishes a multi selection menu and returns items
Metadata
Release files for pycolims 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycolims-0.2.0.tar.gz | 9.4 kB | Without provenance | Details for pycolims-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycolims-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pycolims-0.2.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / pycolims-0.2.0.tar.gz
| Download URL | pycolims-0.2.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f95c5346d16a77ec10cc130f2afd4675210775e8b10be760ee152b4e437ee17
|
|
BLAKE2b-256 checksum How to use checksums |
82297eedc8248ad4dbebd3707ec97606ee1d58072f8c26e6f50b0c1dc1110688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
|
Release files / pycolims-0.2.0-py3-none-any.whl
| Download URL | pycolims-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f8ac2db74ffb6c8bc668ae743d87e3b45a67caabf8f3c59187ef1e47eed824c
|
|
BLAKE2b-256 checksum How to use checksums |
7d1c99140a0bdbf9fe35aac01037cf65d590bb6cef719fa8efa9f0b30a02b25e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
|
Security for pycolims 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.