poppy.core.command module

class poppy.core.command.Command[source]

Bases: object

Base class for all accepted commands for the pop command line program.

add_arguments(parser)[source]

Used by the user to add arguments associated to the given parser.

classmethod add_parent_parser(name, parser)[source]

Used to add a parser with its options and be able to refer from a command, since the conflict handler of argparse is not well done, as many other things.

has_children()[source]

To know if the command has subcommands.

manager = <poppy.core.command.CommandManager object>
parser(subparser, parents)[source]

Return the parser for the command and options that this command must use. Take as argument the subparser from the parent parser.

print_help()[source]

Print the command help message

setup_tasks(pipeline)[source]

Set up the task workflow

subparser(parser)[source]

Should return a subparser for this command. Not always called, just when the command has possibly subcommands to generate.