def parse_argv():
    d = {}
    l = []
    for v in sys.argv[1:]:
        if v[:2] == '--':
            try:
                k, v = v[2:].split('=')
                d[k] = v
            except ValueError:
                d[v[2:]] = None
        else:
            l.append(v)
    return d, l
parse sys.argv into a dictionary of GNU-style args (--foo=bar)
dataset/ETHPy150Open cjlee112/pygr/pygr/coordinator.py/parse_argv