Initial Commit
[Projects.git] / website / web / framework.py
blob36a37b30e9e91cc889b7b915f14f4e6ede81d883
1 import SocketServer
3 def run(host,port,server=SocketServer.TCPServer):
4 server.allow_reuse_address = True
5 httpd = server((host,port),handler)
6 httpd.serve_forever()
8 class handler:
9 import handler
10 def __init__(self, request, client_address, server):
11 self.request = request
12 self.client_address = client_address
13 self.server = server
14 self.request.send(self.handler.main(self.client_address,self.request.recv(1024)))