From 72f787c21be1d5f615f822cc4ba9be3d01dadc67 Mon Sep 17 00:00:00 2001 From: nlitkowski Date: Tue, 27 Apr 2021 21:03:51 +0200 Subject: [PATCH] Add reading input file --- main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..d6feffe --- /dev/null +++ b/main.py @@ -0,0 +1,17 @@ +import csv +import sys +import lzma + + +def main(fname): + print(fname) + with lzma.open(fname, mode="rt", encoding="utf-8") as tsvfile: + reader = csv.reader(tsvfile, delimiter='\t', quoting=csv.QUOTE_NONE) + for item in reader: + pass + + +if __name__ == "__main__": + if len(sys.argv) < 2: + raise Exception("Input file not provided") + main(sys.argv[1])