def main_pipeline(filedir): #point it somewhere with a bunch of text files pipe = Pipeline(getFileNames(filedir), frequencyCount, pruneCommon, writer) pipe.run() while(not pipe.isDone()): pass out.close()