Makes a string of filename patterns from a list of (description,[patterns]) tuples.

def make_pattern_list(patterns):
    """Makes a string of filename patterns from a list of (description,[patterns]) tuples."""
    pattstrs = []
    for desc, patts in patterns:
        # ";," not allowed in descriptions or patterns
        patts = [p.replace(";", "").replace(",", "") for p in patts]
        desc = desc.replace(";", "").replace(",", "")
        pattstrs.append("%s=%s" % (desc, ','.join(patts)))
    return ";".join(pattstrs)