Extension of the cmd.Cmd command line. This extensions supports line
breaking, history, comments, internal call to cmdline, path
completion,... this class should be MG5 independent
|
|
|
|
|
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
|
|
|
no_notification(self)
avoid to have html opening / notification |
source code
|
|
|
precmd(self,
line)
A suite of additional function needed for in the cmd this implement
history, line breaking, comment treatment,... |
source code
|
|
|
postcmd(self,
stop,
line)
finishing a command This looks if the command add a special post
part. |
source code
|
|
|
define_child_cmd_interface(self,
obj_instance,
interface=True)
Define a sub cmd_interface |
source code
|
|
|
ask(self,
question,
default,
choices=[ ] ,
path_msg=None,
timeout=True,
fct_timeout=None,
ask_class=None,
alias={ } ,
first_cmd=None,
text_format=' 4 ' ,
force=False,
return_instance=False,
**opt)
ask a question with some pre-define possibility path info is |
source code
|
|
|
do_import(self,
line)
Advanced commands: Import command files |
source code
|
|
|
check_import(self,
args)
check import command |
source code
|
|
|
check_answer_in_input_file(self,
question_instance,
default,
path=False,
line=None)
Questions can have answer in output file (or not) |
source code
|
|
|
store_line(self,
line)
store a line of the input file which should be executed by the higher
mother |
source code
|
|
|
get_stored_line(self)
return stored line and clean it |
source code
|
|
|
|
|
|
|
|
|
onecmd_orig(self,
line,
**opt)
Interpret the argument as though it had been typed in response to the
prompt. |
source code
|
|
|
|
|
onecmd(self,
line,
**opt)
catch all error and stop properly command accordingly |
source code
|
|
|
stop_on_keyboard_stop(self)
action to perform to close nicely on a keyboard interupt |
source code
|
|
|
exec_cmd(self,
line,
errorhandling=False,
printcmd=True,
precmd=False,
postcmd=True,
child=True,
**opt)
for third party call, call the line with pre and postfix treatment
without global error handling |
source code
|
|
|
run_cmd(self,
line)
for third party call, call the line with pre and postfix treatment
with global error handling |
source code
|
|
|
|
|
|
|
do_history(self,
line)
write in a file the suite of command that was used |
source code
|
|
|
|
|
|
|
|
|
get_history_header(self)
Default history header |
source code
|
|
|
postloop(self)
Hook method executed once when the cmdloop() method is about to
return. |
source code
|
|
|
do_quit(self,
line)
Not in help: exit the mainloop() |
source code
|
|
|
do_EOF(self,
line)
Not in help: exit the mainloop() |
source code
|
|
|
do_exit(self,
line)
Not in help: exit the mainloop() |
source code
|
|
|
|
|
do_display(self,
line,
output=sys.stdout)
Advanced commands: basic display |
source code
|
|
|
do_save(self,
line,
check=True)
Save the configuration file |
source code
|
|
|
write_configuration(self,
filepath,
basefile,
basedir,
to_keep)
Write the configuration file |
source code
|
|
Inherited from CheckCmd :
check_history ,
check_save
Inherited from HelpCmd :
help_EOF ,
help_display ,
help_help ,
help_history ,
help_quit ,
help_save
Inherited from CompleteCmd :
complete_display ,
complete_history ,
complete_save
Inherited from BasicCmd :
complete ,
deal_multiple_categories ,
getTerminalSize ,
print_suggestions ,
set_readline_completion_display_matches_hook
Inherited from OriginalCmd :
columnize ,
complete_help ,
completedefault ,
completenames ,
get_names ,
parseline ,
print_topics
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|