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
+importos
2
+importsys
3
+importcsv
4
+
5
6
+defconvert(input, out):
7
+ifos.path.exists(out):
8
+raiseValueError("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
+forrowinreader:
13
+writer.writerow(row)
14
15
+if__name__=="__main__":
16
+convert(sys.argv[1], sys.argv[2])
0 commit comments