title: How to restrict the maximum CPU utilization for a python program
body: <p>I have searched it over internet but found nothing related to it.</p>
  
  <p>I have two  large python dictionaries that contains more than 2 Million key value pairs .My computer is continuously  showing 100% utilization when I am doing any kind of computation on this data.</p>
  
  <p>Due to this I am not able to perform other task on my system as it hangs frequently.</p>
  
  <p>Is there any way that can restrict the maximum CPU allocation for a python program by writing some code in the python program itself.As I do not want to allow this program to use 100% cpu time.</p>
  
  <p>PS: I am currently using sleep function to restrict it but it looks silly.I am using windows 7.</p>