Skip to main content

Easy menu tool for gathering inputs

Project description

Menus

Easy CLI menu creation tool

Installation

pip install python-menu

Menu Example

>>> from menu import *
>>>  menu1 = Menu(title="Menu1",options=["option1","option2","option3"], result="index"
>>> menu1.show()
[+] Menu1        [1] option1     [2] option2     [3] option3

(Menu) > 1
>>> print(menu1.value)
1
>>> menu1.update(title="Updated Menu1",options=["option1","option2","option3"], result="value")
>>> menu1.show()
[+] Updated Menu1        [1] option1     [2] option2     [3] option3

(Menu) > 1
>>> print(menu1.value)
option1

List Example

>>> from menu import *
>>> list1 = List(title="List1", options="Option 1",result="index")
>>> list1.show()
[+] List1
[+] 1 - Option 1

(Option) > 1
>>> print(list1.value)
1
>>> list1.update(title="Update List1", options=["Option 1","Option 2"],result="value")
>>> list1.show()
[+] Update List1
[+] 1 - Option 1

[+] 2 - Option 2

(Option) > 2
>>> print(list1.value)
Option 2

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

python-menu-1.1.5.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file python-menu-1.1.5.tar.gz.

File metadata

  • Download URL: python-menu-1.1.5.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10

File hashes

Hashes for python-menu-1.1.5.tar.gz
Algorithm Hash digest
SHA256 543f9afefca198de12ca1bbd4104ac423c871192a0a30e34f00d8c190dd0b590
MD5 866da9b94dde087a80660942373ed959
BLAKE2b-256 c863963bc2741cfa41a17745c049e91b2f788bcbfb14602217d194f9fe9a42f5

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