Skip to main content

The easy way to create command line menus

Project description

The easy way to create command line menus

Demo

>>> from pyclimenu.pyclimenu import Menu
>>> def first_function(a=0):
...     print(a*2)
...
>>> def second_function(a=0):
...     print(a*4)
...
>>> mn = pyclimenu.Menu()
>>> mn.add_item(label='first function', callback=first_function, params={'a': 2})
>>> mn.add_item(label='second function', callback=second_function, params={'a': 1})
>>> menu.display()

 [0] first function
 [1] second function
 [2] Exit
Select option: > 1
4
>>>

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

pyclimenu-0.1.1.9.tar.gz (2.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page