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. 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                                         │
╰────────────────────────────────────────────────────────╯
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")
menu.add_function_item("item1", lambda x: print(x), {'x':"testparam"})
menu.add_function_item("item2", lambda x: print(x), {'x':"testparam"}))
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.0.3.tar.gz (3.6 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.0.3-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: micromenu-1.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for micromenu-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6c37c55ee5c1d509e97ce78f0b35662c19d34aa72aff4463f9c79e5051c707d3
MD5 faeac66b20798a21f9aef3cf3950f1b2
BLAKE2b-256 8b5095cad719a85fc95a2476ecf1cc073f6eb38fd2d953a8df0e5387e1eeff2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: micromenu-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for micromenu-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2888a8fa4deeebe911ef7ed01b18b121feec01c179956bd2b189fb7c9c4ffb92
MD5 5452aa03e6cbe3c6a9d4ebd720540d4b
BLAKE2b-256 c503ddae6dabc6ef9157ca28bfdc69911121f617f4af946ad72d649dc44a57d8

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