Created
June 30, 2025 01:08
-
-
Save hornc/8ab7c455f351e8f1ef96ec8623041a15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import csv | |
def main(): | |
parser = argparse.ArgumentParser(description='Convert CSV to TSV.') | |
parser.add_argument('csv', help='CSV file to convert') | |
args = parser.parse_args() | |
infile = args.csv | |
with open(infile, newline='') as csvfile: | |
csvreader = csv.reader(csvfile, delimiter=',') | |
for row in csvreader: | |
print('\t'.join(row)) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment