@@ -0,0 +1,29 @@ | |||
import http.server | |||
class EigenerHandler(http.server.BaseHTTPRequestHandler): | |||
def do_GET(self): | |||
self.send_response(200) | |||
self.send_header('Content-tyoe', 'text-html') | |||
self.end_headers() | |||
msg = """ | |||
<html> | |||
<head> | |||
<title> YingYang </title> | |||
</head> | |||
<body> | |||
<b>Ying</b> | |||
</body> | |||
</html> | |||
""" | |||
self.wfile.write(msg.encode('utf-8')) | |||
port = 12345 | |||
handler = EigenerHandler | |||
address = ('', port) | |||
server = http.server.HTTPServer(address, handler) | |||
server.serve_forever() |