title: Python BaseHTTPServer and Tornado
body: <p>I'm running a BaseHTTPServer, passed through ThreadedHTTPServer so I get threading.</p>
  
  <pre><code>server = ThreadedHTTPServer(('', int(port)), MainHandler)
  </code></pre>
  
  <p>Next I fork according to the info here: <a href="https://stackoverflow.com/questions/888834/daemonizing-pythons-basehttpserver">Daemonizing python&#39;s BaseHTTPServer</a></p>
  
  <p>Then I do:</p>
  
  <pre><code>server.serve_forever()
  </code></pre>
  
  <p>What I am trying to do is have the same Python script run a Tornado WebSocket server as well, I tried creating the second handler and in my main creating the second server similar to above, but then the serve_forever() blocks (I assume) and I can't start the Tornado WebSocket server.</p>
  
  <p>I had considered using Tornado to serve my general web stuff too but performance was aweful and unusable, so I'd prefer to run it alongside, unless there is a simpler alternative to adding WebSockets to the BaseHTTPServer.</p>
  
  <p>Can anyone offer a solution please?</p>