Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (15 sloc) 548 Bytes
#!/usr/bin/env python
import http.server
class myHandlers(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
RESPONSE='''Edited code'''
self.wfile.write(bytes(RESPONSE, 'UTF-8'))
def run(server_class=http.server.HTTPServer, handler_class=myHandlers):
server_address = ('', 8000)
myserver = server_class(server_address, handler_class)
myserver.serve_forever()
if __name__ == "__main__":
run()