wsgiref.simple_server.demo_appをWSGIコンテナで動かす

今回はDjango関係なし。Pythonのライブラリに入っているwsgiref.simple_server.demo_appをWSGIコンテナで動かしてみた。コンテナのsite.wsgiを書き換えるだけで動く。

import string

from wsgiref.simple_server import demo_app

from container.mwheader import *
from container.mwredirect import *
from container.mwenvironment import *

environ = WSGIEnvironment()
environ.seturi(nav_uri.value)
environ.setcookie(cookie.value)
environ.setpost(containerpost.value)
containerpost.value = ''

application = demo_app
res = application(environ.dict, startcontainer)

render.value = string.join(res)


WSGI!WSGI!WSGI!