Skip to main content

Python menu for CLI

Project description

PyCLIMenu

CLI Menu module for Python.

Usage

Standard usage

from pyclimenu import menu

main_menu = menu.Menu("Main Menu")

main_menu.add_items({
    "Option 1": callback_1,
    "Option 2": callback_2
})

main_menu.display()

Alternatively...

from pyclimenu import menu

menu.BasicMenu("Main Menu", {
    "Option 1": callback_1,
    "Option 2": callback_2
})

Option menu

from pyclimenu import menu

color_menu = menu.OptionMenu("Color")

red = (255, 0, 0)
green = (0, 255, 0)
blue = (0, 0, 255)

color_menu.add_items({
    "Red": red,
    "Green": green,
    "Blue": blue
})

color = color_menu.display()

Alternatively...

from pyclimenu import menu

color_menu = menu.BasicOptionMenu("Color", {
    "Red": (255, 0, 0),
    "Green": (0, 255, 0),
    "Blue": (0, 0, 255)
})

color = color_menu.selection

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

py-climenu-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

py_climenu-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file py-climenu-0.0.2.tar.gz.

File metadata

  • Download URL: py-climenu-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for py-climenu-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d2d5c1781ff82dd2e500f25f1bf1c5f90078298d4962650ae538551c7d47c8d7
MD5 4b7d5d43b99fb642e8f830198410a739
BLAKE2b-256 42b1c2f435d83f25ae0aa876411f0f83616eb5ade81312079197b41e0169f721

See more details on using hashes here.

File details

Details for the file py_climenu-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: py_climenu-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for py_climenu-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef15692482ddbf94e3e61e8dc6d095ef949e37369687364f6c9e3c563d9e6ac
MD5 c9bff32a7043e68b857d74e5b0590937
BLAKE2b-256 c9db51f33986b59fab83775d6b0beff4070e287c77c881655fa71929c691ce90

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