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

Class SmartQuestion

source code

cmd.Cmd --+    
          |    
   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) 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
 
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

Inherited from cmd.Cmd: columnize, complete_help, completedefault, do_help, parseline, postloop, precmd, print_topics

Static Methods [hide private]

Inherited from BasicCmd: list_completion, path_completion, split_arg

Class Variables [hide private]

Inherited from cmd.Cmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Method Details [hide private]

preloop(self)

source code 

Initializing before starting the main loop

Overrides: cmd.Cmd.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: cmd.Cmd.__init__
(inherited documentation)

completenames(self, text, line, *ignored)

source code 
Overrides: cmd.Cmd.completenames

get_names(self)

source code 
Overrides: cmd.Cmd.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: cmd.Cmd.onecmd

default(self, line)

source code 

Default action if line is not recognized

Overrides: cmd.Cmd.default

emptyline(self)

source code 

If empty line, return default

Overrides: cmd.Cmd.emptyline

postcmd(self, stop, line)

source code 

Hook method executed just after a command dispatch is finished.

Overrides: cmd.Cmd.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: cmd.Cmd.cmdloop
(inherited documentation)