title: Porting a Bash while loop to Python 2
body: <p>I'm an intern porting a Linux Bash script to Python 2.6. This script basically powers an intranet dashboard that displays data about servers. It updates every minute, and is constantly running, pretty much 24/7.</p>
  
  <p>I would like some help converting the below Bash line to Python:</p>
  
  <pre><code>(while sleep 30; do custom_cmd &gt; tmp.txt; cp tmp.txt index.html; rm tmp.txt; done) &amp; 
  </code></pre>
  
  <p>I have confusion converting the '&amp;', which I know turns the while loop into a background process. The <code>while sleep 30</code> runs infinitely (as long as the user is active), and does work every 30 seconds (sleeping until then). I have already ported <code>custom_cmd</code> (which generates the html for the dashboard) to Python 2.6.</p>
  
  <p>The Bash script is configured with "nohup", which I believe means the script will run even after the user logs out of the Linux machine.</p>
  
  <p>That being said, how could I convert the above Bash line to Python, so that it runs as a background process, <em>forever</em>? Thank you very much.</p>