patchwork.py 文件源码

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

项目:patchwork 作者: Factual 项目源码 文件源码
def parse_args(argv):
    helpstring = 'dep-check.py [-c <config_file>] [-v -t -s]'

    fname = PATCHWORK_PATH + '/patchwork/config.json' # if not specified, look in current directory
    global VERBOSE
    global TEST
    global PERSIST
    try:
        opts, args = getopt.getopt(argv,"hvtsc:",["verbose","test","save","config="])
    except getopt.GetoptError:
        print(helpstring)
        sys.exit(2)
    for opt, arg in opts:
        if opt == '-h':
            print(helpstring)
            sys.exit()
        elif opt in ("-c", "--config"):
            fname = arg
        elif opt in ("-v", "--verbose"):
            VERBOSE = True
        elif opt in ("-t", "--test"):
            TEST = True
        elif opt in ("-s", "--save"):
            PERSIST = True
    return fname
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号