|
- Method resolution order:
- Shell
- cmd.Cmd
- builtins.object
Methods defined here:
- __init__(self)
- 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.
- check_config_file(self) -> bool
- This function returns True if config file
exists else writes it and returns False.
- complete_help(self, *args)
- This function returns a empty list for help completion.
- completedefault(self, text: str, line: str, begidx: str, endidx: str) -> List[str]
- This functions returns filenames and directories for completion.
- completenames(self, line: str, state: str)
- This functions returns filenames and directories for completion.
- default(self, command: str) -> bool
- This function executes the command line.
- do_GetConfigFile(self, args: str) -> bool
- This function prints the configuration filename.
- do_cd(self, directory: str) -> bool
- This function changes the current directory
- do_configfile(self, args: str) -> bool
- This function prints the configuration filename.
- do_exit(self, args: str) -> bool
- This function closes and quits the shell
- do_help(self, args: str) -> bool
- This function executes the help command.
- do_quit(self, args: str) -> bool
- This function closes and quits the shell
- format(self, string: str) -> str
- This fonction formats string template.
- get_config(self, section: str, value: str) -> ~Config
- This function returns config or None
- get_last_command_state(self)
- This function returns the status of the last command.
- postcmd(self, stop: bool, args: str) -> bool
- This function formats and prints the prompt value.
- postloop(self) -> None
- This function prints the exit message and
changes the Unix Shell Color.
- precmd(self, command: str) -> str
- This function searchs and replaces command by alias.
- preloop(self) -> None
- This function prints the start message and
changes the Unix Shell Colors.
Data and other attributes defined here:
- cwd = '/home/christophe/Téléchargements/python/CustomShell'
Methods inherited from cmd.Cmd:
- 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.
- columnize(self, list, displaywidth=80)
- Display a list of strings as a compact set of columns.
Each column is only as wide as necessary.
Columns are separated by two spaces (one was not legible enough).
- complete(self, text, state)
- Return the next possible completion for 'text'.
If a command has not been entered, then complete against command list.
Otherwise try to call complete_<command> to get list of completions.
- emptyline(self)
- Called when an empty line is entered in response to the prompt.
If this method is not overridden, it repeats the last nonempty
command entered.
- get_names(self)
- onecmd(self, line)
- Interpret the argument as though it had been typed in response
to the prompt.
This may be overridden, but should not normally need to be;
see the precmd() and postcmd() methods for useful execution hooks.
The return value is a flag indicating whether interpretation of
commands by the interpreter should stop.
- parseline(self, line)
- Parse the line into a command name and a string containing
the arguments. Returns a tuple containing (command, args, line).
'command' and 'args' may be None if the line couldn't be parsed.
- print_topics(self, header, cmds, cmdlen, maxcol)
Data descriptors inherited from cmd.Cmd:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from cmd.Cmd:
- doc_header = 'Documented commands (type help <topic>):'
- doc_leader = ''
- identchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
- intro = None
- lastcmd = ''
- misc_header = 'Miscellaneous help topics:'
- nohelp = '*** No help on %s'
- prompt = '(Cmd) '
- ruler = '='
- undoc_header = 'Undocumented commands:'
- use_rawinput = 1
|