initial commit
This commit is contained in:
14
csv-reader.py
Normal file
14
csv-reader.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
import csv
|
||||
|
||||
def sanitize(text):
|
||||
return text.replace("~", "~!").replace("\t", "~t").replace("\r", "~r").replace("\n", "~n")
|
||||
|
||||
reader = csv.reader(sys.stdin)
|
||||
for inrow in reader:
|
||||
outrow = []
|
||||
for text in inrow:
|
||||
outrow.append(sanitize(text))
|
||||
print("\t".join(outrow))
|
||||
|
||||
#jl
|
||||
Reference in New Issue
Block a user