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