title: Restart python file after error
body: <p>I have a program that streams prices and is getting a badstatusline error during slow hours.  This causes issues with other files that need to interact with the stream.  I am having much trouble simply catching the exceptions, leading to other exceptions that I cannot catch for some reason <code>BadStatusLine</code> leads to <code>CannotSendRequest</code> leads to <code>ResponseNotReady</code>.  How can I simply restart (in this case) trading.py when execution.py raises the exception <code>BadStatusLine</code>?</p>
  
  <p>Here is how I'm handling it now..  </p>
  
  <pre><code>while True:
      try:
          response = self.conn.getresponse().read()
          print response
      except Exception:
          pass 
      else:
          break
  </code></pre>
  
  <p>Its a stream using Httplib if thats of importance</p>
  
  <p>Thanks for the help</p>
  
  <p>Here is the error as well:</p>
  
  <pre><code>Exception in thread Thread-1:
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
      self.run()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
      self.__target(*self.__args, **self.__kwargs)
    File "/Users/mattduhon/trading4.py", line 30, in trade
      execution.execute_order(event)
    File "/Users/mattduhon/execution.py", line 34, in execute_order
      response = self.conn.getresponse().read()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1073, in getresponse
      response.begin()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 415, in begin
      version, status, reason = self._read_status()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 379, in _read_status
      raise BadStatusLine(line)
  BadStatusLine: ''
  </code></pre>