title: BaseHTTPRequestHandler with custom instance
body: <p>this is my http server:</p>
  
  <pre><code>from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
  
  class test:
      def show(self):
          return "aaaa"
  
  class http_server:
      def __init__(self, t1):
          self.t1 = t1
          server = HTTPServer(('', 8080), myHandler)
          server.serve_forever()
  
  class myHandler(BaseHTTPRequestHandler):
      def do_GET(self):
          self.send_response(200)
          self.send_header('Content-type','text/html')
          self.end_headers()
          self.wfile.write(self.t1.show()) #Doesnt work
          return
  
  class main:
      def __init__(self):
          self.t1 = test()
          self.server = http_server(self.t1)
  
  if __name__ == '__main__':
      m = main()
  </code></pre>
  
  <p>I need to acces instance t1 inside of myHander. </p>
  
  <p>Is there any way how to do it ?</p>
  
  <p>Thanks!</p>