title: Automatically restart program when error occur
body: <p>The program is like this：</p>
  
  <pre><code>HEADER CODE
  urllib2.initialization()
  try:
      while True:
          urllib2.read(somebytes)
          urllib2.read(somebytes)
          urllib2.read(somebytes)
          ...
  except Exception, e:
      print e
  FOOTER CODE
  </code></pre>
  
  <p>My question is when error occurs (timeout, connection reset by peer, etc), how to restart from urllib2.initialization() instead of existing main program and restarting from HEADER CODE again？</p>