Skip to content

Instantly share code, notes, and snippets.

@mopemope
Created July 19, 2011 05:15
Show Gist options
  • Save mopemope/1091365 to your computer and use it in GitHub Desktop.
Save mopemope/1091365 to your computer and use it in GitHub Desktop.
yield response
from meinheld import server
def hello_world(environ, start_response):
status = '200 OK'
res = "Hello world!"
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
yield res
yield "Yield"
server.listen(("0.0.0.0", 8000))
server.run(hello_world)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment