Package madgraph :: Package interface :: Module extended_cmd :: Class SmartQuestion
[hide private]
[frames] | no frames]

Class SmartQuestion

source code

 object --+        
          |        
OriginalCmd --+    
              |    
       BasicCmd --+
                  |
                 SmartQuestion
Known Subclasses:

a class for answering a question with the path autocompletion

Instance Methods [hide private]
 
preloop(self)
Initializing before starting the main loop
source code
 
__init__(self, question, allow_arg=[], default=None, mother_interface=None, *arg, **opt)
Instantiate a line-oriented interpreter framework.
source code
 
__call__(self, question, reprint_opt=True, **opts) source code
 
completenames(self, text, line, *ignored)
Method called to complete an input line when no command-specific complete_*() method is available.
source code
 
completedefault(self, text, line, *ignored)
Method called to complete an input line when no command-specific complete_*() method is available.
source code
 
get_names(self) source code
 
onecmd(self, line, **opt)
catch all error and stop properly command accordingly Interpret the argument as though it had been typed in response to the prompt.
source code
 
reask(self, reprint_opt=True) source code
 
do_help(self, line) source code
 
complete_help(self, text, line, begidx, endidx) source code
 
default(self, line)
Default action if line is not recognized
source code
 
emptyline(self)
If empty line, return default
source code
 
postcmd(self, stop, line)
Hook method executed just after a command dispatch is finished.
source code
 
cmdloop(self, intro=None)
Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.
source code

Inherited from BasicCmd: complete, deal_multiple_categories, getTerminalSize, print_suggestions, set_readline_completion_display_matches_hook

Inherited from OriginalCmd: columnize, parseline, postloop, precmd, print_topics

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

Static Methods [hide private]

Inherited from BasicCmd: list_completion, path_completion, split_arg

Class Variables [hide private]
  allowpath = False

Inherited from OriginalCmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Properties [hide private]
  answer

Inherited from object: __class__

Method Details [hide private]

preloop(self)

source code 

Initializing before starting the main loop

Overrides: OriginalCmd.preloop

__init__(self, question, allow_arg=[], default=None, mother_interface=None, *arg, **opt)
(Constructor)

source code 

Instantiate a line-oriented interpreter framework.

The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.

Overrides: object.__init__
(inherited documentation)

completenames(self, text, line, *ignored)

source code 

Method called to complete an input line when no command-specific complete_*() method is available.

By default, it returns an empty list.

Overrides: OriginalCmd.completenames

completedefault(self, text, line, *ignored)

source code 

Method called to complete an input line when no command-specific complete_*() method is available.

By default, it returns an empty list.

Overrides: OriginalCmd.completedefault
(inherited documentation)

get_names(self)

source code 
Overrides: OriginalCmd.get_names

onecmd(self, line, **opt)

source code 

catch all error and stop properly command accordingly Interpret the argument as though it had been typed in response to the prompt.

The return value is a flag indicating whether interpretation of commands by the interpreter should stop.

This allow to pass extra argument for internal call.

Overrides: OriginalCmd.onecmd

do_help(self, line)

source code 
Overrides: OriginalCmd.do_help

complete_help(self, text, line, begidx, endidx)

source code 
Overrides: OriginalCmd.complete_help

default(self, line)

source code 

Default action if line is not recognized

Overrides: OriginalCmd.default

emptyline(self)

source code 

If empty line, return default

Overrides: OriginalCmd.emptyline

postcmd(self, stop, line)

source code 

Hook method executed just after a command dispatch is finished.

Overrides: OriginalCmd.postcmd
(inherited documentation)

cmdloop(self, intro=None)

source code 

Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.

Overrides: OriginalCmd.cmdloop
(inherited documentation)

Property Details [hide private]

answer

Get Method:
unreachable.answer(self)