[python] How to save python screen output to a text file