SelectionItem

Bases: consolemenu.items.MenuItem

class consolemenu.items.SelectionItem(text, index, menu=None, menu_char=None)[source]

The item type used in consolemenu.SelectionMenu

Variables:
  • text (str) – The text shown for this menu item
  • index (int) – The index of this item in the list used to initialize the consolemenu.SelectionMenu
  • menu (ConsoleMenu) – The menu to which this item belongs
  • menu_char (str) – The character used to select this menu item. Optional - defaults to None.
get_return()[source]
Returns:The index of this item in the list of strings
Return type:int