Skip to content

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

Description

@HunteRoi

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) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions