Skip to main content

A minimalistic command line menu

Project description

micromenu

CI and CD codecov PyPI PyPI - Downloads

A minimalistic command line menu for Python, with a title and optional message bars and dividers. Callable functions are attached to each menu item.

╭─── This is a title ────────────────────────╮
│ Message that shows on top                  │
╞════════════════════════════════════════════╡
│ 1: Menu item 1                             │
│ 2: Menu item 2                             │
│ 3: Menu item 3                             │
├────────────────────────────────────────────┤
│ 0: Exit                                    │
├────────────────────────────────────────────┤
│ Bottom message row 1                       │
│ Bottom message row 2                       │
╰────────────────────────────────────────────╯
Action number:

Set the parameter cycle=False if the menu should not loop back after an item has been executed. menu.show() will return True after terminating.

Installation

python3 -m pip install micromenu

Example usage

import micromenu

menu = micromenu.Menu("test", "this is a message", "and a bottom message", min_width=25)
menu.add_function_item("item1", lambda x: print(x), {'x':"testparam"})
menu.add_divider()
menu.add_function_item("item2", lambda x: print(x), {'x':"testparam"}))
menu.add_message_bottom_row("bottom msg")
menu.show()

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

micromenu-1.3.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

micromenu-1.3.0-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file micromenu-1.3.0.tar.gz.

File metadata

  • Download URL: micromenu-1.3.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for micromenu-1.3.0.tar.gz
Algorithm Hash digest
SHA256 46fb055a37d2f36cabfbec749adacb456ab6ac88d0d09a82cfe99fcaefeabd2d
MD5 5a5e49ebddeaf9240d82389582710b4d
BLAKE2b-256 a384ed29cc5ce87608f42b359f330c7a0a48dc854d393dc2a626bafa698e3b79

See more details on using hashes here.

File details

Details for the file micromenu-1.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: micromenu-1.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for micromenu-1.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b37531a5aadfa500d74d9f53ac340b339b2eacf6efd3a86d7e9adc82069e19ce
MD5 bfadc804e0ce92fe9e659100f632bcc2
BLAKE2b-256 570859c3ee3eb05c856d085920d6be62b379c22881ac6212386a53836c17a103

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