f.close() resultLocation = str(letter)+":/Comment-Graph Report/Result/Comment Report/" + str(dare) + ".txt" nameLocation = str(letter) + ":/Comment-Graph Report/Result/Comment Report/" + str(dare) + " Names.txt" nameofnames = open(nameLocation, 'w') results = open(resultLocation, 'w') results.write("\n") results.write(d) #Record current filename name results.write("\n----------------------------------------------") results.write("\nName of filename: " + (str(filename[41:]))) text = c.bumpIt(filename, d) #Names overall = c.topicList(d, filename, ignoreWords) word = [] #Open the filename and create a list of the words within negative = c.topicList("NEGATIVE", filename, ignoreWords) positive = c.topicList("POSITIVE", filename, ignoreWords) words = overall #words = a list of all words in the filename #positive = a list of all the words used in positive comments in the filename #negative = a list of all the words used in negative comments in the filename #Create filename to read for wordcloud overallresult = str(letter)+":/Comment-Graph Report/Files to Analyze/Overallfilename" + str(counts) + ".txt" negativeresult = str(letter)+":/Comment-Graph Report/Files to Analyze/Negativefilename" + str(counts) + ".txt"