def printMenu(menu, showExit=True, prefix=''):
    """Prints the menu for the user to see

    :param menu: an array of menu entries, each menu entry is a dictionary
    :param showExit: boolean for whether or not to show the EXIT entry
    :param prefix: string to print in from of the menu entry (e.g for formatting)

    :returns: n/a

    The 'menu' parameter is an array of dictionary values. Each entry in the array
    translates to a single menu item that looks like the following dictionary:
        {
            'type': '<type>',
            'index': #<index>#,
            'text': '<text>'
        }

    The dictionary may contain other entries. The 'type' and 'text' fields are both
    string values. The 'type' value only has one special value ('EXIT') used to denote
    the Exit menu entry; it may otherwise be any arbitrary string. The 'index' field
    is typically an integer used to provide the value input for the user to select
    the menu item with.

    There are two easy ways to create the menu dictionary:

        menu = [
            {'type': 'entry', 'index': 0, 'text': 'First Entry'},
            {'type': 'entry', 'index': 1, 'text': 'Second Entry'},
            {'type': 'entry', 'index': 2, 'text': 'Third Entry'},
        ]

    or 

        menu = []
        for x in range(3):
            menu.append({
                'type': 'entry',
                'index': len(menu),
                'text': 'Entry #{0}'.format(x)
            })
    """
    for entry in menu:
        if entry['type'] == 'EXIT' and showExit is True or entry['type'
            ] != 'EXIT':
            print('{0:}{1:02d}) {2:}'.format(prefix, entry['index'], entry[
                'text']))
