Skip to content

Instantly share code, notes, and snippets.

@aodag
Created September 27, 2011 03:09
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 aodag/1244224 to your computer and use it in GitHub Desktop.
Save aodag/1244224 to your computer and use it in GitHub Desktop.
pyramid on tornardo with py3
<html>
<body>
<h1>Hello</h1>
</body>
</html>
import os
from pyramid.config import Configurator
here = os.path.dirname(__file__)
def index(request):
return dict()
settings = {
"mako.directories": [here]
}
config = Configurator(settings=settings)
config.add_view(index, renderer="index.mak")
app = config.make_wsgi_app()
import tornado.wsgi
import tornado.httpserver
container = tornado.wsgi.WSGIContainer(app)
http_server = tornado.httpserver.HTTPServer(container)
http_server.listen(8888)
tornado.ioloop.IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment