taucmdr.cli.command module
Base class for TAU Commander commands
-
class taucmdr.cli.command.AbstractCommand(module_name, format_fields=None, summary_fmt=None, help_page_fmt=None, group=None)[source]
Bases: object
Abstract base class for TAU Commander commands.
-
module_name
Name of the command module this command object belongs to.
- Type:
str
-
command
Command line string that executes this command.
- Type:
str
-
group
If not None, commands will be grouped together by group name in help messages.
- Type:
str
-
_abc_impl = <_abc._abc_data object>
-
abstractmethod _construct_parser()[source]
Construct a command line argument parser.
-
_parse_args(argv)[source]
-
format_usage(show_defaults=True)[source]
Return the command’s usage.
- Parameters:
show_defaults (bool) – If False, leave out argument defaults, some of which depend on the host.
- Returns:
The usage text, as the --help option shows it.
- Return type:
str
-
property help_page
Long and informative description of the command.
- Type:
str
-
abstractmethod main(argv)[source]
Command program entry point.
- Parameters:
argv (list) – Command line arguments.
- Returns:
Process return code: non-zero if a problem occurred, 0 otherwise
- Return type:
int
-
property parser
-
property summary
One-line summary of the command.
- Type:
str
-
property usage