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
|
|
|
|
|
ask(self,
question,
default,
choices=[],
path_msg=None,
timeout=True,
fct_timeout=None)
ask a question with some pre-define possibility path info is |
source code
|
|
|
|
check_answer_in_input_file(self,
options,
path=False)
Questions can have answer in output file (or not) |
source code
|
|
|
|
|
|
|
clean_history(self,
to_keep=['set', 'add', 'load'],
remove_bef_lb1=None,
to_remove=['open', 'display', 'launch'],
keep_last=False)
Remove all commands in arguments from history |
source code
|
|
|
|
correct_splitting(line)
if the line finish with a '-' the code splits in a weird way on
GNU_SPLITTING |
source code
|
|
|
|
|
|
|
define_child_cmd_interface(self,
obj_instance,
interface=True)
Define a sub cmd_interface |
source code
|
|
|
|
|
|
|
do_display(self,
line,
output=sys.stdout)
Advanced commands: basic display |
source code
|
|
|
|
|
|
|
|
|
|
do_history(self,
line)
write in a file the suite of command that was used |
source code
|
|
|
|
|
|
|
do_save(self,
line,
check=True)
Save the configuration file |
source code
|
|
|
|
|
|
|
exec_cmd(self,
line,
errorhandling=False,
printcmd=True,
precmd=False,
postcmd=True)
for third party call, call the line with pre and postfix treatment
without global error handling |
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
|
|
|
|
precmd(self,
line)
A suite of additional function needed for in the cmd this implement
history, line breaking, comment treatment,... |
source code
|
|
|
|
run_cmd(self,
line)
for third party call, call the line with pre and postfix treatment
with global error handling |
source code
|
|
|
|
stop_on_keyboard_stop(self)
action to perform to close nicely on a keyboard interupt |
source code
|
|
|
|
store_line(self,
line)
store a line of the input file which should be executed by the higher
mother |
source code
|
|
|
|
write_configuration(self,
filepath,
basefile,
basedir)
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 object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
Inherited from BasicCmd:
complete,
deal_multiple_categories,
getTerminalSize,
preloop,
print_suggestions
Inherited from cmd.Cmd:
cmdloop,
columnize,
complete_help,
completedefault,
completenames,
get_names,
parseline,
postcmd,
print_topics
|