📜  python代码示例中的服务器

📅  最后修改于: 2022-03-11 14:45:45.736000             🧑  作者: Mango

代码示例5
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
    server_address = ('', 8000)
    httpd = server_class(server_address, handler_class)
    httpd.serve_forever()