title: time.sleep requires integers?
body: <p>I'm writing a macro that will click certain spots on the screen when I press a key. </p>
  
  <p>The first time I press a key, everything runs fine.<br>
  However, any other key press results in the error:  </p>
  
  <pre><code>    time.sleep(0.1)
  TypeError: an integer is required
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>import win32api
  import win32con
  import time
  import pythoncom
  import pyHook
  import os
  
  def Click(x,y):
      win32api.SetCursorPos((x,y))
      win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
      win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
  
  def DeleteRun(event):
      Click(1250, 741)
      time.sleep(0.1)
      Click(649,261)
      time.sleep(0.1)
      Click(651, 348)
      time.sleep(0.1)
      Click(800, 442)
      time.sleep(0.1)
      Click(865, 612)
  
  
  Click(20,20)
  KeyGrabber = pyHook.HookManager()
  KeyGrabber.KeyDown = DeleteRun
  KeyGrabber.HookKeyboard()
  pythoncom.PumpMessages()
  </code></pre>
  
  <p>It seems the first time the <code>DeleteRun</code> function is run by <code>pyHook</code>, <code>time.sleep(</code>) accepts floats.<br>
  On any following function calls, it seems it only accepts integers.</p>
  
  <p>What is causing this?<br>
  I can't wait 5 seconds for the mouse arrangement! It's supposed to save time!</p>
  
  <p><strong>Specs:</strong></p>
  
  <ul>
  <li>python 2.7.2  </li>
  <li>Windows 7 (32)  </li>
  </ul>