def _setup_command_line_interface():
parser = argparse.ArgumentParser(description=("Setup and manage an "
"embedded development "
"infrastructure."))
parser.add_argument("-v", "--verbose", action="store_true",
help="increase output verbosity to INFO")
parser.add_argument('--log', choices=['DEBUG', 'INFO', 'WARNING',
'ERROR', 'CRITICAL'],
help="modify log level (default is WARNING)")
subparsers = parser.add_subparsers(title='commands',
dest="command_name")
for _, command in get_sub_commands().items():
command.advertise(subparsers)
argcomplete.autocomplete(parser)
return parser
评论列表
文章目录