title: How do I print one word at a time in python shell?
body: <p>I already have code for performing this task, but I can only perform this in the command prompt. The number you put into the function is words per minute, so if you input 60, you will get 60 wpm, or one word per second.</p>
  
  <pre><code>import sys
  import time
  
  data = "is sentence with some words this is a some. words this is a sentence with some words".split()
  
  
  def inputwordsperminute(x):
  
  
      max_len=max([len(w) for w in data])
      pad = " "*max_len
      for w in data:
          sys.stdout.write('%s\r' % pad)
          sys.stdout.write("%s\r" % w)
          sys.stdout.flush()
          time.sleep((60.0/x))
  
  print
  
  inputwordsperminute(200)
  </code></pre>
  
  <p>I was told that I have to import curses in order to get this working in shell. How do I do that? Will I need to write something completely different?</p>