cmd.Cmd.preloop()

Cmd.preloop() Hook method executed once when cmdloop() is called. This method is a stub in Cmd; it exists to be overridden by subclasses.

cmd.Cmd.precmd()

Cmd.precmd(line) Hook method executed just before the command line line is interpreted, but after the input prompt is generated and issued. This method is a stub in Cmd; it exists to be overridden by subclasses. The return value is used as the command which will be executed by the onecmd() method; the precmd() implementation may re-write the command or simply return line unchanged.

cmd.Cmd.postloop()

Cmd.postloop() Hook method executed once when cmdloop() is about to return. This method is a stub in Cmd; it exists to be overridden by subclasses.

cmd.Cmd.postcmd()

Cmd.postcmd(stop, line) Hook method executed just after a command dispatch is finished. This method is a stub in Cmd; it exists to be overridden by subclasses. line is the command line which was executed, and stop is a flag which indicates whether execution will be terminated after the call to postcmd(); this will be the return value of the onecmd() method. The return value of this method will be used as the new value for the internal flag which corresponds to stop; returning false will caus

cmd.Cmd.onecmd()

Cmd.onecmd(str) 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. If there is a do_*() method for the command str, the return value of that method is returned, otherwise the return value from the default() method is returned.

cmd.Cmd.misc_header

Cmd.misc_header The header to issue if the help output has a section for miscellaneous help topics (that is, there are help_*() methods without corresponding do_*() methods).

cmd.Cmd.lastcmd

Cmd.lastcmd The last nonempty command prefix seen.

cmd.Cmd.intro

Cmd.intro A string to issue as an intro or banner. May be overridden by giving the cmdloop() method an argument.

cmd.Cmd.identchars

Cmd.identchars The string of characters accepted for the command prefix.

cmd.Cmd.emptyline()

Cmd.emptyline() Method 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.