from spotregen.parser import build_parser
args = build_parser().parse_args(["--root", "demo", "check", "--strict"])
print(args.command, args.strict, args.root)check True demo
Build the argument parser of the spotregen command line.
The parser is the single description of the subcommands, their options, defaults and help texts; the command line and any front end read it instead of repeating it. The options of the two drivers are registered by the drivers themselves and are not part of this parser.
| Name | Type | Description |
|---|---|---|
| argparse.ArgumentParser | argparse.ArgumentParser: The parser, with the subcommand in command. |