You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
317 B

import csv
class LoadCSV:
def __init__(self, filename):
self.hostlist = []
with open(filename, newline='', encoding='UTF-8-sig') as f:
f_csv = csv.DictReader(f)
for row in f_csv:
self.hostlist.append(row)
def export(self):
return self.hostlist