Mercurial > hg > python
annotate csvtotsv.py @ 43:f67f9ea191b7
from http://sourceforge.net/projects/pdf2xml/files/misc/vec2svg-2.py/download
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 24 Feb 2022 15:43:26 +0000 |
parents | e07789816ca5 |
children |
rev | line source |
---|---|
2
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
1 #!/usr/bin/python3 |
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
2 import csv,sys |
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
3 with open(sys.argv[1],newline='') as f: |
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
4 r=csv.reader(f) |
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
5 for l in r: |
e07789816ca5
adding more python files from lib/python on origen
Henry Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
6 print('\t'.join(s.replace("\n","") for s in l)) |