title: How to play short mp3 file in python script in the background (Daemon) repeatedly?
body: <p>I use linux, e.g. Pepermint OS. There is a mysql table, there is numeric field as a flag.  The table only has 1 record. If the field contain 1, I want to play a short mp3 once an then update the field to 0/zero again. There is an application that can play mp3 from command prompt, e.g mpg123.</p>
  
  <p>To play the mp3, I use the following script :</p>
  
  <pre><code>import subprocess
  call = "mpg123 ting_tong1.mp3 &amp; "
  p = subprocess.Popen( call, shell=True, stdout=subprocess.PIPE,   stderr=subprocess.STDOUT)
  </code></pre>
  
  <p>I want the script run in the background, like a service in Windows. I have been trying night and day with several daemon library in python, but no luck.</p>
  
  <p>There should a music sound e.g. the mp3 sound, every time the field changed from 0 to 1 !</p>
  
  <p>The daemon run but the music only run once :( .  How to do that ? Thanks !</p>