-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.mojo
31 lines (26 loc) · 829 Bytes
/
test.mojo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from collections import Dict, List
from pathlib import Path, cwd
from sys import argv
from src.csv_reader import CsvReader
# from src.open_csv import open_csv
def main():
try:
in_csv = Path(argv()[1])
# print(in_csv)
with open(in_csv, "r") as fi:
var rd = CsvReader(fi.read())
# print(rd.col_count)
for x in range(len(rd.elements)):
print(rd.elements[x])
# -------------
# var rd: CsvReader = open_csv(in_csv)
# print(rd.col_count)
# for x in range(len(rd.elements)):
# print(rd.elements[x])
except Exception:
print("error: ", Exception)
# def main():
# in_csv = Path(argv()[1])
# var rd = CsvReader(in_csv)
# for x in range(len(rd.elements)):
# print(rd.elements[x])