import os, socket # Server Main Function def server(adress): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(adress) s.listen(5) print("Sever Start: {}".format(adress)) while True: sock, addr = s.accept() print("Linked Machine adress: {}".format(addr)) sock.sendall("""HTTP/1.1\r\nContent-Type: text/html;charset=utf-8\r\n\r\n <html> <head> <title>Home Page</title> </head> <body> <h1>You saw, and you think, maybe so differnt.</h1> </body> </html> """.encode()) # run part if __name__ == '__main__': server(("", 9000))