title: Kill the process using its name inside linux (Python)
body: <p>this works, but it kills every Python process.</p>
  
  <pre><code>pkill python
  </code></pre>
  
  <p>However, I cannot do:</p>
  
  <pre><code>pkill myscript.py
  </code></pre>
  
  <p>I have also tried <em>killall</em>, but with no luck either.
  Do I have to user regular expressions?</p>
  
  <p>By the way, I want to do this in a python script with <strong>import os.</strong></p>