def get_config():
base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
p = configargparse.getArgumentParser(default_config_files=[os.path.join(base_dir, 'conf.ini')])
p.add('-c', '--my-config', required=False, is_config_file=True, help='config file path')
p.add_argument('-p', '--cert_path', type=str, required=True,
help='Path to certificates')
p.add_argument('-u', '--url_prefix', type=str,
help='URL prefix')
p.add_argument('-o', '--output_path', type=str,
help='Path to output file')
args, _ = p.parse_known_args()
return args
extract_links.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录