Source

BlingNode / utils.py

Full commit
def list_callback(option, opt, value, parser):
    """
        options util for list of paired inputs in form of "val1:val2,val3:val4".
        also works for a list of inputs in the form of "val1,val2,val3,val4".
    """
    values = value.split(',')
    ref_values = []
    for x in values:
        ref_values.append(tuple(x.split(':')))
    setattr(parser.values, option.dest, ref_values)