Skip to main content

Create command-line menus

Project description

Menu is used for easily creating command-line menus.

Included Files

  • menu/ - python module used for creating command-line menus


Python must be installed in order for Menu to be imported. Install python at In the terminal type “cd path/to/this/directory” and then “python install”. This will add the menu module to your site-packages.

How to Use

Import menu


import menu

Create a Menu

The Menu constructor takes one non-optional argument, the title, and one optional argument, an update function that gets called every time the menu is show:

mainMenu = menu.Menu(title,update=updateFunction)

To make a submenu make a property of the main menu another menu:

mainMenu.submenu = menu.Menu(title,update=updateFunction)

Add options to a menu:

options = [{"name":"firstOption","function":firstFunc},

Change the way options are added to a menu:

options = [{"name":"firstOption","function":firstFunc},


options = [("firstOption",firstFunc),

Display a menu, wait for user input, and call a corresponding function:

would look like this


1. firstOption
2. secondOption
3. thirdOption


Change the user input indicator:


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Menu-1.3.tar.gz (2.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page