Python/WebApplication
提供:やる気向上作戦
Web Application
ColubridでWSGIアプリケーションをデバッグ
DebuggedApplicationでラップする。
from colubrid.debug import DebuggedApplication
CGIHandler().run(DebuggedApplication(MyApplication))
WSGIアプリケーションをCGIで動かす
wsgirefに含まれる、CGIHandlerを用いる。
from wsgiref.handlers import CGIHandler
class MyApp(SomeWSGIApplicationClass):
...
app = MyApp
if __name__ == '__main__':
CGIHandler().run(app)
wsgirefは、Python2.5以上なら標準で搭載されている。2.4以下の場合は、easy_installでインストールできる。
easy_install wsgiref