We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 648aa0a commit 5631b3cCopy full SHA for 5631b3c
19_tsv-to-csv.py
@@ -0,0 +1,16 @@
1
+import os
2
+import sys
3
+import csv
4
+
5
6
+def convert(input, out):
7
+ if os.path.exists(out):
8
+ raise ValueError("Output file already exists")
9
10
+ reader = csv.reader(open(input, 'rU'), dialect=csv.excel_tab)
11
+ writer = csv.writer(open(out, "wb+"), dialect="excel")
12
+ for row in reader:
13
+ writer.writerow(row)
14
15
+if __name__ == "__main__":
16
+ convert(sys.argv[1], sys.argv[2])
0 commit comments