CLI
A representation of a command line interface which layers simple command dispatching on the basic ArgParse interface
extra_commands: dict
__init__(self, name, description, *groups, cmd_name=None):
name:strdescription:strcmd_name:str | Nonegroups:Type[CommandGroup]
parse_group_command(self):
Parses a group and command argument (if possible) and prunes sys.argv
group:Anycommand:Any:returns:_
get_command(self):
get_group(self, grp):
run_command(self):
get_help(self):
Gets the help string for the CLI
:returns:_
help(self, print_help=True):
run_parse(self, parse, unknown):
Provides a standard entry point to running stuff using the default CLI
parse:Anyunknown:Any:returns:_
parse_toplevel_args(self):
Parses out the top level flags that the program supports
:returns:_
run(self):
Parses the arguments in sys.argv and dispatches to the approriate action.
By default supports interactive sessions, running scripts, and abbreviated tracebacks.
:returns:_