Application base class.
Parameters: |
|
---|
Return an argparse option parser for this application.
Subclasses may override this method to extend the parser with more global options.
Parameters: |
|
---|
Hook run after a command is done to shutdown the app.
Parameters: |
|
---|
Create logging handlers for any log output.
Hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. Invoked only once, even in interactive mode.
Parameters: | argv – List of arguments, including the subcommand to run. Empty for interactive mode. |
---|
Perform any preliminary work needed to run a command.
Parameters: | cmd (cliff.command.Command) – command processor being invoked |
---|
Equivalent to the main program for the application.
Parameters: | argv (list of str) – input arguments and options |
---|
Provides “interactive mode” features.
Refer to the cmd2 and cmd documentation for details about subclassing and configuring this class.
Parameters: |
|
---|
Discovers commands and handles lookup based on argv data.
Parameters: | namespace – String containing the setuptools entrypoint namespace for the plugins to be loaded. For example, 'cliff.formatter.list'. |
---|
Given an argument list, find a command and return the processor and any remaining arguments.
Base class for command plugins.
Parameters: | app (cliff.app.App) – Application instance invoking the command. |
---|
Return the command description.
Return an argparse.ArgumentParser.
Invoked by the application when the command is run.
Developers implementing commands should override take_action().
Developers creating new command base classes (such as Lister and ShowOne) should override this method to wrap take_action().
Override to do something useful.
Base class for formatters that know how to deal with multiple objects.
Format and print the list from the iterable data source.
Parameters: |
|
---|
Base class for formatters that work with single objects.
Format and print the values associated with the single object.
Parameters: |
|
---|