def write_csv(rows, delim):
    writer = csv.writer(click.get_text_stream('stdout'), delimiter=delim)
    try:
        [writer.writerow(row) for row in rows]
    except (OSError, __HOLE__):
        sys.stderr.close()
dataset/ETHPy150Open learntextvis/textkit/textkit/utils.py/write_csv