def flatten(args):
    from itertools import izip_longest

    p = OptionParser(flatten.__doc__)
    p.set_sep(sep=",")
    p.add_option("--zipflatten", default=None, dest="zipsep",
                 help="Specify if columns of the file should be zipped before" +
                 " flattening. If so, specify delimiter separating column elements" +
                 " [default: %default]")
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    tabfile, = args
    zipsep = opts.zipsep

    fp = must_open(tabfile)
    for row in fp:
        if zipsep:
            row = row.rstrip()
            atoms = row.split(opts.sep)
            frows = []
            for atom in atoms:
                frows.append(atom.split(zipsep))
            print "\n".join([zipsep.join(x) for x in list(izip_longest(*frows, fillvalue="na"))])
        else:
            print row.strip().replace(opts.sep, "\n")
Return libdnet/Scapy device name for given pypcap device name
dataset/ETHPy150Open tanghaibao/jcvi/formats/base.py/flatten--crossover with--dataset/ETHPy150Open phaethon/scapy/scapy/arch/windows/__init__.py/devname