Skip to content

Instantly share code, notes, and snippets.

@nsonnad
Created November 22, 2013 11:38
Show Gist options
  • Select an option

  • Save nsonnad/7598574 to your computer and use it in GitHub Desktop.

Select an option

Save nsonnad/7598574 to your computer and use it in GitHub Desktop.

Revisions

  1. nsonnad created this gist Nov 22, 2013.
    8 changes: 8 additions & 0 deletions tsv2csv.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    import sys
    import csv

    tabin = csv.reader(sys.stdin, dialect=csv.excel_tab)
    commaout = csv.writer(sys.stdout, dialect=csv.excel)

    for row in tabin:
    commaout.writerow(row)