title: Auto-restart system in Python
body: <p>I need to detect when a program crashes or is not running using python and restart it. I need a method that doesn't necessarily rely on the python module being the parent process.</p>
  
  <p>I'm considering implementing a while loop that essentially does </p>
  
  <pre><code>ps -ef | grep process name
  </code></pre>
  
  <p>and when the process isn't found it starts another. Perhaps this isn't the most efficient method. I'm new to python so possibly there is a python module that does this already.</p>