title: How to check if memcached is running and start it if not from python?
body: <p>I'm developing a web application using python and memcached. </p>
  
  <p>First I want to start memcached from my python program, and if I'm right <code>subprocess.Popen(["memcached"]);</code> will do it. What really bothers me is how to check if memcached is already running in the background. </p>
  
  <p>I want something like </p>
  
  <pre><code>if check_memcached():
      start_memcached();
  </code></pre>
  
  <p>The <code>check_memcached()</code> function should return true if memcached is not already running. Anybody got any idea how to do this?</p>