title: How to use cpulimit to a python script
body: <p>From the answer to my <a href="https://stackoverflow.com/questions/35547734/python-write-dynamically-huge-files-avoiding-100-cpu-usage">old question</a>, I gone through <a href="http://cpulimit.sourceforge.net/" rel="nofollow noreferrer">this</a> and some more from google. But I did not understand, how can I <code>cpulimit</code> for a python script.
  Followings are my try:</p>
  
  <pre><code>cpulimit --limit 20 --exe ./read_heavy_csv.py
  
  cpulimit --limit 20 --exe "python read_heavy_csv.py" 
  
  cpulimit -P ./read_heavy_csv.py -l 20
  </code></pre>
  
  <p>and some more...</p>
  
  <p>But in each case getting warning :</p>
  
  <pre><code>Warning: no target process found. Waiting for it...
  </code></pre>
  
  <p>I could not find any documentation to explain running a python script with <code>cpulimit</code>. I also gone through <a href="https://www.google.co.in/?gfe_rd=cr&amp;ei=QTHMVq7DIrLG8Afr36vwAw#safe=active&amp;q=cpulimit%20python%20script" rel="nofollow noreferrer">these too</a> but did not get any clue</p>