bin/tsv2csv @ 4673e928c08e
Split Stump config
| author | Steve Losh <steve@stevelosh.com> | 
|---|---|
| date | Tue, 19 Mar 2024 13:55:42 -0400 | 
| parents | c55540587f76 | 
| children | (none) | 
#!/usr/bin/env python3 import sys import csv def run_file(f): w = csv.writer(sys.stdout) for row in csv.reader(f, delimiter='\t'): w.writerow(row) def run(paths): for path in paths: if path == '-': run_file(sys.stdin) else: with open(path) as f: run_file(f) if __name__ == '__main__': run(sys.argv[1:] or ['-'])