title: Run certain code every n seconds
body: <p>Is there a way to, for example, print <code>Hello World!</code> every n seconds?
  For example, the program would go through whatever code I had, then once it had been 5 seconds (with <code>time.sleep()</code>) it would execute that code. I would be using this to update a file though, not print Hello World.</p>
  
  <p>For example:</p>
  
  <pre><code>startrepeat("print('Hello World')", .01) # Repeats print('Hello World') ever .01 seconds
  
  for i in range(5):
      print(i)
  
  &gt;&gt; Hello World!
  &gt;&gt; 0
  &gt;&gt; 1
  &gt;&gt; 2
  &gt;&gt; Hello World!
  &gt;&gt; 3
  &gt;&gt; Hello World!
  &gt;&gt; 4
  </code></pre>