fileconcord = open('ccord-cultural.txt', 'w')
tmpout = sys.stdout
sys.stdout = fileconcord
text.concordance('cultural', 200, sys.maxsize)
fileconcord.close()
Python: how to capture output to a text file? (only 25 of 530 lines captured now)