Skip to main content

A simple Python console (terminal) menu that work's on any OS

Project description

What's this?

A simple Python console (terminal) menu that work's on any OS and is navigable by only using a keyboard.

Usage

Example code:

import consolemenu_py as cm

async def main():
    # Create the main menu. The name should usually be the name of your program
    mm = cm.MainMenu("Example Program")

    # This will enter an empty sub-menu
    mm.add_item(cm.Menu("A sub-menu!"))

    # This will print "Hello World!" to the console
    mm.add_item(cm.FunctionMenuItem("A function menu item", lambda _: print("Hello World!")))

    # This will only return if the user exists the main menu
    await mm.run()

Will look like this:

License

This package is licensed under MIT, see LICENSE

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

consolemenu.py-0.2.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

consolemenu.py-0.2.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file consolemenu.py-0.2.2.tar.gz.

File metadata

  • Download URL: consolemenu.py-0.2.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.2 Windows/10

File hashes

Hashes for consolemenu.py-0.2.2.tar.gz
Algorithm Hash digest
SHA256 36605bf556b8d7bc85e7c91f26847ca4d0dcd1bc9f50ce280f56efed59abb0ea
MD5 a17d3e91b1780ce48047e244d470e214
BLAKE2b-256 2bdc96e14ea11340d4afc882128343d73860956a7d4e01bbdc1d42fa4a86a7d8

See more details on using hashes here.

File details

Details for the file consolemenu.py-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: consolemenu.py-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.2 Windows/10

File hashes

Hashes for consolemenu.py-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aec9b0da63fb4e09d97ac6d51b43b4a4bb9351718b6e025c712273899c3af2e9
MD5 9e1430fea89cc5e3ffe2d4489bf3a3aa
BLAKE2b-256 254d23da82c001c22df51e74cd04001c75fc5352584c7697ba4df4098d533441

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