Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from wsgiref.util import setup_testing_defaults
- from wsgiref.simple_server import make_server
- def simple_app(environ, start_response):
- start_response("200 OK",[('Content-type', 'text/html')] )
- return ("""<button onclick="window.location='/hello'">say hello</button> """
- if "hello" not in environ["PATH_INFO"] else
- """<h1>Hello World</h1>""")
- make_server('', 8080, simple_app).serve_forever()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement