def parse_args(args):
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='cfpp',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('filename', metavar='filename')
parser.add_argument('-s', '--search-path',
action='append',
default=['.'],
help='List of paths to search when reading files '
'referenced from the CloudFormation template. '
'The current working directory is always '
'searched first, regardless of this '
'setting. Specify this option once for each '
'directory to add to the search path.')
parser.add_argument('--version',
action='version',
version=VERSION,
help='Display version number and exit.')
args = parser.parse_args(args)
return args
评论列表
文章目录