aegirhall / console-menu

A simple Python menu system for building terminal user interfaces.
MIT License
365 stars 58 forks source link

Request user's input does not permit to print a message #94

Open HunteRoi opened 10 months ago

HunteRoi commented 10 months ago

The method input on a screen can take a prompt (string) as parameter to be displayed before waiting for the user's input. However, the method from the console menu giving access to the screen's input method does not allow it. https://github.com/aegirhall/console-menu/blob/b9b2b88c5413eaee51570242ea3329b9f23f94e7/consolemenu/screen.py#L49

Wouldn't it be better to be able to do it, though?

Instead of https://github.com/aegirhall/console-menu/blob/b9b2b88c5413eaee51570242ea3329b9f23f94e7/consolemenu/console_menu.py#L296-L304

It would be :

     def get_input(self, prompt=''): 
         return self.screen.input(prompt)