Module zut.command

Define and run command-line interfaces.

Functions

add_command(subparsers, handle, *[, name, ...])

Add a command to the given parser or subparsers.

add_package_commands(subparsers, package)

Add all sub modules of the given package as commands.

create_parser([prog, description, version])

define_parser_command(parser_or_parent, ...)

exec_handle(handle, kwargs, *[, default_help])

exec_parser(parser[, args, default_help, ...])

get_defined_commands(subparsers)

get_description_text(doc)

get_exit_code(code)

get_first_non_option_arg([args])

get_help_help(arg)

get_help_text(doc)

get_or_add_subparsers(parser)

get_subparsers(parser)

parse_doc(doc)

Parse a function or module docstring into a help, description, epilog, param_helps tuple.

remove_implicit_django_kwargs(kwargs)

set_help_help(arg, value)

Classes

CommandParser([prog, usage, description, ...])

ParsedDoc(help, description, epilog, ...)

Exceptions

SimpleError

A simple error expected to be printed without a stack trace.