Skip to main content

The easy way to create command line menus

Project description

This python module creates simple command line menus. Just define the callable and the label of each option and voila! Foreground, background color numbering and labels are adjustable.

Install

$ pip install git+https://github.com/sp1thas/pyclimenu.git

Demo

>>> from pyclimenu.menu import Menu
>>> def a():
...     print('''
...     Let's Rock!
...     ''')
...     return 1
>>> mn = Menu()
>>> mn.add_item(label='The easy way', callback=a, args=())
>>> mn.add_item(label='to create', callback=a, kwargs={})
>>> mn.add_item(label='command line menus', callback=a)
>>> mn.set_colors(num_fg='cyan', num_bld=True, label_fg='blue', label_bld=True)
>>> results = mn.run(header='pyclimenu')
>>> results
1
imgs/display.png

Todo

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.13.tar.gz (3.2 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