Python text file processor.