IngoMeyer441 / simple-term-menu

A Python package which creates simple interactive menus on the command line.
MIT License
492 stars 43 forks source link

Feature Request - menu item accepts output of function #62

Open markfaine opened 2 years ago

markfaine commented 2 years ago

Something like the FunctionItem class in https://github.com/aegirhall/console-menu

I prefer simple-term-menu but I find this a hole in the functionality. I need this feature to make a complete menu. Otherwise I have to supplement the menu with non-menu screens that accept input.

IngoMeyer441 commented 1 year ago

Could you please give a small code example how this feature is intended to be used? If I understand the documentation of console-menu correctly, the function is executed after the item is selected. Couldn't you use a dictionary which assigns a bound function to menu indices?