title: How to redirect python output to both python console and a text file in Windows
body: <p>I have a python script_1 which will be used to call another python script_2 using subprocess. When I do that I can see so many print statements and ouputs on the python console (or cmd). How can I redirect this output to a file along with displaying the output on the python console.</p>
  
  <p>Basically, I need a windows executable command for <code>' | &amp; tee '</code> command of Linux.
  I tried many methods and all those didn't work.</p>
  
  <p>Thanks for the help. :)</p>