server on python

Solutions on MaxInterview for server on python by the best coders in the world

showing results for - "server on python"
Emilio
24 Oct 2016
1import http.server
2import socketserver
3
4PORT = 8000
5
6Handler = http.server.SimpleHTTPRequestHandler
7
8with socketserver.TCPServer(("", PORT), Handler) as httpd:
9    print("serving at port", PORT)
10    httpd.serve_forever()
11