Skip to content

Instantly share code, notes, and snippets.

@mariocesar
Created September 15, 2015 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariocesar/26d43578e5c58d88f272 to your computer and use it in GitHub Desktop.
Save mariocesar/26d43578e5c58d88f272 to your computer and use it in GitHub Desktop.
wsgi application dummy demo
import os
index_tpl = open('index.html', 'r').read()
def application(environ, response):
response('200 OK', [('Content-Type', 'text/html')])
yield '<ul>'
for root, dirs, files in os.walk('.'):
for d in dirs:
yield '<li><a href="%s">%s</a></li>' % (d, d)
for f in files:
yield '<li>%s</li>' % f
yield '</ul>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment