このブログは、旧・はてなダイアリー「檜山正幸のキマイラ飼育記 メモ編」(http://d.hatena.ne.jp/m-hiyama-memo/)のデータを移行・保存したものであり、今後(2019年1月以降)更新の予定はありません。

今後の更新は、新しいブログ http://m-hiyama-memo.hatenablog.com/ で行います。

werkzeug

uWSGIの説明中に、Werkzeugってがの出てきて、何だろうと思ったので。

よくわからんがインストール。


PS C:\Users\hiyama\Work\ProjectCaty> easy_install werkzeug
Searching for werkzeug
Reading http://pypi.python.org/simple/werkzeug/
Reading http://werkzeug.pocoo.org/
Reading http://trac.pocoo.org/repos/werkzeug/trunk
Best match: Werkzeug 0.8.3
Downloading http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-0.8.3.tar.gz#md5=12aa03e302ce49da98703938f257347a

Processing Werkzeug-0.8.3.tar.gz
Running Werkzeug-0.8.3\setup.py -q bdist_egg --dist-dir c:\users\hiyama\appdata\local\temp\easy_install-lucl3r\Werkzeug-
0.8.3\egg-dist-tmp-e_rvqt
warning: no files found matching '*' under directory 'werkzeug\debug\templates'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs\_build'
Adding werkzeug 0.8.3 to easy-install.pth file

Installed c:\installed\python26\lib\site-packages\werkzeug-0.8.3-py2.6.egg
Processing dependencies for werkzeug
Finished processing dependencies for werkzeug
PS C:\Users\hiyama\Work\ProjectCaty>

どこの何がインストールされたんじゃろ? /Installed/Python26/Lib/site-packages/werkzeug-0.8.3-py2.6.egg らしい。

http://python.matrix.jp/web/werkzeug/ を見て:

# simple.py
def application(env, start_response):
  start_response('200 OK', [('ContentType', 'text/plain')])
  return 'Hello WSGI world!'

from werkzeug import run_simple
run_simple('0.0.0.0', 8000, application)


PS C:\Users\hiyama\Work\ProjectCaty> python .\simple.py
* Running on http://0.0.0.0:8080/
127.0.0.1 - - [18/Feb/2012 17:59:21] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [18/Feb/2012 17:59:21] "GET /favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [18/Feb/2012 17:59:23] "GET /favicon.ico HTTP/1.1" 200 -

フーン。Catyのwsgirefの代わりに使えたりするかな?