25 lines
521 B
Python
25 lines
521 B
Python
import csv
|
|
import os
|
|
|
|
script_dir = os.path.dirname(__file__)
|
|
|
|
|
|
def parsecsv():
|
|
libcsv = open(os.path.join(script_dir, "varlib.csv"), "r")
|
|
with libcsv:
|
|
csv_as_dict = csv.DictReader(libcsv)
|
|
return csv_as_dict
|
|
|
|
|
|
def getpublications():
|
|
libcsv = open(os.path.join(script_dir, "varlib.csv"), "r")
|
|
with libcsv:
|
|
csv_as_dict = csv.DictReader(libcsv)
|
|
listofbooks = []
|
|
for row in csv_as_dict:
|
|
listofbooks.append(row["Publication"])
|
|
return listofbooks
|
|
|
|
|
|
parsecsv()
|