title: break/interrupt a time.sleep() in python
body: <p>I need to break from time.sleep() using ctrl c.</p>
  
  <pre><code>While 1:
      time.sleep(60)
  </code></pre>
  
  <p>In the above code when the control enters time.sleep function an entire 60 seconds needs to elapsed for python to handled the CTRL C </p>
  
  <p>Is there any elegant way to do it. such that I can interrupt even when the control is in time.sleep function</p>
  
  <p>edit</p>
  
  <p>I was testing it on a legacy implementation which uses python 2.2 on windows 2000 which caused all the trouble . If I had used a higher version of python CTRL C would have interrupted the sleep() . I did a quick hack by calling sleep(1) inside a for loop . which temporarily fixed my issue</p>