You're sort of abusing the csv module there, at least right up until the end where you're actually using it as intended to write your "ListOfAbstracts.txt". ^_^
Just so you know, to read a file line by line (getting a simple list of strings, one string for each line), you can just use the file's readlines() method, e.g.:
def readlines(path):
with open(path) as file:
return file.readlines()
# print document line by line
for line in readlines("document.tex"):
print(line + "\n")
You're sort of abusing the csv module there, at least right up until the end where you're actually using it as intended to write your "ListOfAbstracts.txt". ^_^
Just so you know, to read a file line by line (getting a simple list of strings, one string for each line), you can just use the file's readlines() method, e.g.: