title: Pausing the script to comply with Twitter API restrictions
body: <p>I'm using Tweepy to get some basic data from a list of Twitter usernames. </p>
  
  <pre><code>reader = csv.reader(open('file.csv','rU'))
  for row in reader:
      username = row[0]
      try:
          results = api.lookup_users(screen_names = [username])
          for result in results:
              numberoffollowers = result.followers_count
              numberoffriends = result.friends_count
              numberofstatuses = result.statuses_count
              print username, row[1], numberoffollowers, numberoffriends, numberofstatuses, "Completed rows",  row_comp
      except:
              continue
  </code></pre>
  
  <p>This works well, however since API restrictions are 180 calls per 15 minutes I need to restrict the script to that rate (which I don't know how to do). I also don't know how long the pause between 180 calls should be – is it a minute, 15 minutes? </p>