title: Terminate a process by its name in Python
body: <p>Lets assume that i am starting a process in python with the following code:</p>
  
  <pre><code>from multiprocessing import Process
  import time
  
  def f(name):
       print ('hello ', name)
  
  if __name__ == '__main__':
       p = Process(target=f,name = "Process-1", args=('bob',))
       p.start()
  </code></pre>
  
  <p>Now,i want to terminate the process.I can simply do:</p>
  
  <pre><code>p.terminate()
  </code></pre>
  
  <p>However, i would like to terminate the process by its name.Is that possible?</p>