Skip to main content

cli.build_parser

cli.build_parser()

Build the argument parser of the spotregen command line.

The parser is the single description of every command, option, default and help text, those of local included. Building it imports no driver.

Returns

Name Type Description
argparse.ArgumentParser argparse.ArgumentParser: The parser, with the command in command.

Examples

from spotregen.cli import build_parser

args = build_parser().parse_args(["--root", "demo", "check", "--strict"])
print(args.command, args.strict, args.root)
check True demo