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.
|
def input(self, prompt=''): |
Wouldn't it be better to be able to do it, though?
Instead of
|
def get_input(self): |
|
""" |
|
Can be overridden to change the input method. |
|
Called in :meth:`process_user_input()<consolemenu.ConsoleMenu.process_user_input>` |
|
|
|
:return: the ordinal value of a single character |
|
:rtype: int |
|
""" |
|
return self.screen.input() |
It would be :
def get_input(self, prompt=''):
return self.screen.input(prompt)
The method
inputon 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.console-menu/consolemenu/screen.py
Line 49 in b9b2b88
Wouldn't it be better to be able to do it, though?
Instead of
console-menu/consolemenu/console_menu.py
Lines 296 to 304 in b9b2b88
It would be :