title: Nohup is not writing log to output file
body: <p>I am using the following command to run a python script in the background:</p>
  
  <pre><code>nohup ./cmd.py &gt; cmd.log &amp;
  </code></pre>
  
  <p>But it appears that nohup is not writing anything to the log file. cmd.log is created but is always empty. In the python script, I am using <code>sys.stdout.write</code> instead of <code>print</code> to print to standard output. Am I doing anything wrong?</p>