title: redirect prints to log file
body: <p>Okay. I have completed my first python program.It has around 1000 lines of code.
  During development I placed plenty of <code>print</code> statements before running a command using <code>os.system()</code>
  say something like,</p>
  
  <pre><code>print "running command",cmd
  os.system(cmd)
  </code></pre>
  
  <p>Now I have completed the program. I thought about commenting them but redirecting all these unnecessary print (i can't remove all <code>print</code> statements - since some provide useful info for user) into a log file will be more useful? Any tricks or tips. </p>