The import threading
Server=socket. The socket ()
# binding to 0.0.0.0: on port 8000, because 0.0.0.0 makes external IP address to access the server. Note that the binding is the address of the server host
Server. The bind ((8000) '0.0.0.0')
Server. Listen ()
Def handle_sock (sock, addr) :
While True:
# the sock. Send (" welcome to server!" Encode (" utf8 "))
Tmp_data=https://bbs.csdn.net/topics/sock.recv (1024)
Print (tmp_data. Decode (" utf8 "))
# input_data=(https://bbs.csdn.net/topics/input)
Response_template=HTTP/1.1 200 OK "'
<body>
Hello World, this is a very simple HTML document.