Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HunteRoi opened this issue Nov 13, 2023 · 0 comments
Open

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

HunteRoi opened this issue Nov 13, 2023 · 0 comments

Comments

@HunteRoi
Copy link

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) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant