mdt_view_maps.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:MDT 作者: cbclab 项目源码 文件源码
def _get_arg_parser(self, doc_parser=False):
        description = textwrap.dedent(__doc__)

        parser = argparse.ArgumentParser(description=description, formatter_class=argparse.RawTextHelpFormatter)
        parser.add_argument('items', metavar='items', type=str, nargs='*', help='the directory or file(s)',
                            default=None).completer = FilesCompleter()

        parser.add_argument('-c', '--config', type=str,
                            help='Use the given initial configuration').completer = \
            FilesCompleter(['conf'], directories=False)

        parser.add_argument('-m', '--maximize', action='store_true', help="Maximize the shown window")
        parser.add_argument('--to-file', type=str, help="If set export the figure to the given filename")

        parser.add_argument('--width', type=int, help="The width of the output file when --to-file is set")
        parser.add_argument('--height', type=int, help="The height of the output file when --to-file is set")
        parser.add_argument('--dpi', type=int, help="The dpi of the output file when --to-file is set")

        return parser
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号