Package mrv :: Module interface :: Class iPrompt
[hide private]
[frames] | no frames]

Class iPrompt

source code

object --+    
         |    
 Interface --+
             |
            iPrompt

Prompt a value from the user, providing a default if no input is retrieved
Instance Methods [hide private]
 
__init__(self, **kwargs)
Configure the prompt, most parameters allow short and long names
source code
 
prompt(self)
activate our prompt :return: the prompted value :note: base implementation just prints a sample text and returns the default
source code

Inherited from Interface: supports

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
Configure the prompt, most parameters allow short and long names
Parameters:
  • kwargs -
    • m/message: Message to be presented, like "Enter your name", must be set
    • d/default: default value to return in case there is no input
    • cd/cancelDefault: default value if prompt is cancelled
    • confirmToken: token to enter/hit/press to finish the prompt
    • cancelToken: token to cancel and abort the prompt
Overrides: object.__init__