import BaseHTTPServer class yhenduseHaldur(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header("Content-type", "text/plain") self.end_headers() self.wfile.write("Soovisid lehte nimega %s" % self.path) ss=BaseHTTPServer.HTTPServer(("", 3001), yhenduseHaldur) ss.serve_forever()