Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# -*- coding: utf-8 -*-
from wsgiref import simple_server
def application(env, res):
status = "200 OK"
body = makeString()
header = [("Content-type", "text/html;charset=UTF-8"),("Content-Length",str(len(body)))]
return [body]
def makeString():
discription = """
<table width='300' border='1'>
#body = "Hello wsgi application\n"
print discription
return discription
if __name__ == "__main__":
sv = simple_server.make_server("", 8080, application) #host , port , application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment