python

VimでPythonを快適に編集するための設定

python編集できるようにvimの設定をしてみました。perlでも殆ど同じような事をやっていたんですが、補完と保存時のsyntax check、それとpython周り固有のindent設定ですね。 indentが異なってるとエラーになるのでindent周りの設定 save時にsyntax checkして…

Pasterのtemplateを作ってみた

Pasterのtemplateを作ってみた。 http://github.com/dann/python-simple_package_templatepasterのtemplateの作り方は、以下のページに。 http://pythonpaste.org/script/developer.html#id6templateを作るときのポイントは、以下の通り。 entry_pointsに、[…

noseでテスト

nosetestsは、proveみたいなものです。plugin機構があって拡張できるようになっているので、prove以上に色んな事ができます。使い方は、いかのとおり。 インストール pip install nose pip install rednoseテストの色づけ.noserc [nosetests] verbosity=3 no…

Pasterでのmoduleのskeltonの生成

Yoshinoriさんに、pasterでmoduleの雛形が作れるというコメントを頂いたので、試してみました。PasteScriptのインストール sudo pip install pasterscript pasterコマンドがインストールされるので、これを使う。新規モジュールの作成 paster create paffy使…

Makefile.PLとsetuptoolsのsetup.pyの対応関係

抑えておけばよさそうなのは、依存関係まわりの以下のような関係。 perl python requires install_requires recommends extras_require test_requires tests_require pylonsの書き方みてれば、大体やりたいことは実現できそうです。 http://pylonshq.com/pro…

PerlとPythonのWAFの要素のmapping

Pythonの勉強がてら、良く知っている領域ということで、WAFの要素における ライブラリ間のマッピングをとってみました。simpleなwafはライブラリがそろってるので、さくっと作れそうな印象です。 Category Perl Python WSGI Plack wsgiref req/res Plack::Re…

Django on GAEで作るmixiアプリ

まりもが大人気のmixiアプリに惹かれて、ちょっと入門してみました。 セットアップ GAEのインストール http://code.google.com/intl/ja/appengine/docs/python/gettingstarted/devenvironment.html app-engine-patchのインストール GAE用にdjangoにpatchをあ…

PythonのAgile開発環境のまとめ

Grig Gheorghiuさんの、Pycon 2006でTutorial. これは聞いてみたいなぁ。Agile development and testing in Python http://agiletesting.blogspot.com/2005/12/tutorial-at-pycon-2006.html 1st hour: Intro: agile development and testing concepts Source…

Agile documentation in the Django project

http://agiletesting.blogspot.com/2005/08/agile-documentation-in-django-project.html The main idea was to use unit tests as "executable documentation" executable documentationの実現方法として興味深いです。他の言語でも参考にできるところが多…