Skip to content

Instantly share code, notes, and snippets.

@gavinengel
Forked from nsonnad/tsv2csv.py
Last active January 27, 2017 17:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavinengel/25631fb8752c38eb9f0c to your computer and use it in GitHub Desktop.
Save gavinengel/25631fb8752c38eb9f0c to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment