Python WSGI

WSGI は python のための Web Server Gateway Interface 規格である。

http://wiki.pylonshq.com/display/pylonsja/PEP333-ja

gihyo.jp の解説記事 http://gihyo.jp/dev/feature/01/wsgi

Ubuntu に入れてみる

since 2010-11-15

Ubuntu 9.04 マシン。

http://blog.srengine.com/2008/03/python-djangoapt-getubuntu.html

$ sudo apt-get install libapache2-mod-wsgi
$ sudo apt-get install python-django

apache

MacPorts

アプリの書き方

http://d.hatena.ne.jp/perezvon/20081103/1225737617

mod_wsgi で WSGI アプリケーションを動かす « TriAx Lab http://bit.ly/Q9aXrV

http://docs.python.org/library/wsgiref.html

#!/usr/bin/python                                                               
def application(environ, start_response):
    status = '200 OK'
    response_headers = [('Content-type', 'text/plain')]
    start_response(status, response_headers)
    return ["It's works!\n", environ.get('SCRIPT_NAME', ''), "\n",
            environ.get('PATH_INFO', ''), "\n",
            environ.get('QUERY_STRING', ''), "\n",
            ]
http://server/app/hoge?hemo
It's works!
/app
/hoge
hemo

POST の取り方

python_wsgi.txt · 最終更新: 2012/09/26 19:03 by Takuya Nishimoto
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0