xapitojson.py 文件源码

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

项目:xapitodict 作者: mseri 项目源码 文件源码
def parse_args_or_exit(argv=None):
    """
    Parse command line options
    """
    parser = argparse.ArgumentParser(
        description='CLI util to dump an xml blob of the xapi database to json')
    parser.add_argument('--version', action='version',
                        version="%%(prog)s %s" %
                                pkg_resources.require("xapitodict")[0].version)
    parser.add_argument(
        "-v", "--print-db-version", dest="print_db", action='store_true',
        help="Include the version metadata of the extracted xapi db "
             "in the '_version' key")
    parser.add_argument("xapi_db", metavar="XAPIDB",
                        help="Path to the xml dump of the xapi database")
    parser.add_argument("-o", "--output", metavar="DEST",
                        dest="dest", default=None,
                        help="Path to the output json file. "
                             "Print to stdout when missing")
    return parser.parse_args(argv)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号