Created
September 15, 2015 20:17
-
-
Save mariocesar/26d43578e5c58d88f272 to your computer and use it in GitHub Desktop.
wsgi application dummy demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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