title: How to use Daemon that has a while loop?
body: <p>I am new with Daemons and I was wondering how can I make my main script a daemon?</p>
  
  <p>I have my main script which I wish to make a Daemon and run in the background:</p>
  
  <pre><code> main.py
  
       def requestData(information):
           return currently_crunched_data()
  
       while True:
            crunchData()
  </code></pre>
  
  <p>I would like to be able to use the requestData function to this daemon while the loop is running. I am not too familiar with Daemons or how to convert my script into one.</p>
  
  <p>However I am guessing I would have to make two threads, one for my cruncData loop and one for the Daemon request receiever since the Daemon has its own loop (daemon.requestLoop()).</p>
  
  <p>I am currently looking into Pyro to do this. Does anyone know how I can ultimately make a background running while loop have the ability to receive requests from other processes (like a Daemon I suppose) ? </p>