title: How to make following code excute every 10 seconds
body: <pre><code>import urllib2
  
  page = urllib2.urlopen('http://127.0.0.1:5000/')
  
  page_content = page.read()
  
  with open('index.html', 'w') as fid:
      fid.write(page_content)
  </code></pre>
  
  <p>I have tried numerous things to get the code to run again after so many seconds but everything I try gives me errors(windows user)</p>
  
  <pre><code>import urllib2 
  import time 
  def executeSomething(): 
      page = urllib2.urlopen('127.0.0.1:5000/') 
      page_content = page.read() with open('index.html', 'w') as fid:
          fid.write(page_content) 
          time.sleep(60) 
  
  while True: 
      executeSomething()
  </code></pre>