FunctionItem¶
Bases: consolemenu.items.ExternalItem
A menu item to call a Python function
Variables: - text (str) – The text shown for this menu item
- function – The function to be called
- args (list) – An optional list of arguments to be passed to the function
- kwargs (dict) – An optional dictionary of keyword arguments to be passed to the function
- menu (ConsoleMenu) – The menu to which this item belongs
- should_exit (bool) – Whether the menu should exit once this item’s action is done
- menu_char (str) – The character used to select this menu item. Optional - defaults to None.
This class overrides this method
This class overrides this method
Returns: The return value from the function call