def make_menu(options, function, name='_none_'): menu = SimpleMenu() menu.set_name(name) for option in options: menu.add(option, function) return menu