title: Check if a particular Python script is already running
body: <p>How can I check, from a Python script, if another specific Python script is running?</p>
  
  <pre><code>def running():
      for q in psutil.process_iter():
          print q
          if q.name() == 'server_class.py':
              return True
      return False
  </code></pre>
  
  <p>I have tried that but the program is called "python" and not the name of the script. </p>