python/make-tsv.py

This commit is contained in:
John Kerl 2024-02-25 21:56:52 -05:00
parent 3ff43fa818
commit 9004098499

21
python/make-tsv.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
import sys
nrow = 2
ncol = 100
if len(sys.argv) == 2:
ncol = int(sys.argv[1])
if len(sys.argv) == 3:
nrow = int(sys.argv[1])
ncol = int(sys.argv[2])
prefix = "k"
for i in range(nrow):
for j in range(ncol):
if j == 0:
sys.stdout.write("%s%07d" % (prefix, j))
else:
sys.stdout.write("\t%s%07d" % (prefix, j))
sys.stdout.write("\n")
prefix = "v"