Ploneのユーザ登録で失敗(postfixを立ち上げる)
2007.03.25
Tips
勉強のため、PythonでつくられたCMSツール(Plone)をインストールしたんだけど、ユーザ登録でメール送信がうまくいかないみたい・・・
どうも、私のMacでは、SMTPサーバが立ち上がってない(確かに立ち上げた記憶がない)ので、早速、MacOSX 10.4に標準でインストールされているPostfixをデフォルトの設定で立ち上げる・・・
Ploneのユーザ登録を再トライしたら、メール遅れて登録完了!
Ploneですが、安倍総理のサイト(β版公式)でも採用されているらしい・・
以下のサイトにPloneについての情報が掲載されているので、メモしておく。
・安倍晋三氏の公式サイトが採用したオープンソースCMS Plone(日経BP ITpro)
・10分で出来るPLONE + COREBLOG2のBLOGポータル(Webcore株式会社)
パスワードをあなたのEメールアドレス:(61, 'Connection refused')に送ることができませんでした。
どうも、私のMacでは、SMTPサーバが立ち上がってない(確かに立ち上げた記憶がない)ので、早速、MacOSX 10.4に標準でインストールされているPostfixをデフォルトの設定で立ち上げる・・・
$ sudo postfix start
Password:*******
Ploneのユーザ登録を再トライしたら、メール遅れて登録完了!
Ploneですが、安倍総理のサイト(β版公式)でも採用されているらしい・・
以下のサイトにPloneについての情報が掲載されているので、メモしておく。
・安倍晋三氏の公式サイトが採用したオープンソースCMS Plone(日経BP ITpro)
・10分で出来るPLONE + COREBLOG2のBLOGポータル(Webcore株式会社)
CarbonEmacsで「Cntl - @」が効かない
2007.02.25
Tips
先日からCarbonEmacsをインストールしてViからEmacsへの移行に奮闘中ですが、「入門 GNU Emacs」で説明のあったSet-Markコマンドが、私のMacでは「Cntl - Space」で起動されない(Spotlightが起動されてしまう)状況で、『キーボードが違うからか...』と諦めて、「Cntl - @」を使っていました。
でも、昨日「Cntl - @」でもSet-Markされない(何故か?日本語入力モードになる、Esc+@でSet-Mark起動)状況に...(再起動すると治ります)
いろいろググってみると、Macでは、「Cntl」→「コマンドキー」?!
確かに「コマンドキー - @」でSet-Mark起動されるけど、マークの開始点がずれる・・私の使い方がわるいのかなぁ?!
とりあえず、最初の問題(「Cntl - Space」でSpotlightが起動されてしまう)を解決させることに...
[Macemacsjp-users 1114]の記事をみて、システム環境設定のSpotlightで起動ショートカットを「Cntl - Spase」から「F13」へ変更。
本対策にはなってないけど、Set-Markは「Cntl - Spase」で起動する使い方で、様子をみようと思う。(通常は、「Cntl - @」でなく「Cntl - Space」だったら、こっちで覚える方が普通か?)
でも、昨日「Cntl - @」でもSet-Markされない(何故か?日本語入力モードになる、Esc+@でSet-Mark起動)状況に...(再起動すると治ります)
いろいろググってみると、Macでは、「Cntl」→「コマンドキー」?!
確かに「コマンドキー - @」でSet-Mark起動されるけど、マークの開始点がずれる・・私の使い方がわるいのかなぁ?!
とりあえず、最初の問題(「Cntl - Space」でSpotlightが起動されてしまう)を解決させることに...
[Macemacsjp-users 1114]の記事をみて、システム環境設定のSpotlightで起動ショートカットを「Cntl - Spase」から「F13」へ変更。
本対策にはなってないけど、Set-Markは「Cntl - Spase」で起動する使い方で、様子をみようと思う。(通常は、「Cntl - @」でなく「Cntl - Space」だったら、こっちで覚える方が普通か?)
PyLint
2007.02.11
Tips
PyCheckerをインストールして使ってみたけど、今度はPyLint。
サイトでの説明に
Pylint is a python tool that checks if a module satisfies a coding standard. Pylint can be seen as another PyChecker since nearly all tests you can do with PyChecker can also be done with Pylint. But Pylint offers some more features, like checking line-code's length, checking if variable names are well-formed according to your coding standard, or checking if declared interfaces are truly implemented, and much more (see the complete check list).
The big advantage with Pylint is that it is highly configurable, customizable, and you can easily write a small plugin to add a personal feature.
と書いてある。ふむふむ、どうやらPyCheckerと機能的には同じ?らしい。でも、こっちの方がより厳しい(Line長や変数名のチェックなど)らしい?(適当な翻訳
)...
では、早速インストール。インストールする最新版(latest version published: 0.12.2)では、
logilab-astng (version >= 0.14)
logilab-common (version >= 0.13)
optik (only for python < 2.3)
が必要のようだ(PyLintのREADMEのページにリンクあり)
■optik
■logilab-common
■logilab-astng
■PyLint
PyCheckerと同じコードをかけてみると...
サイトでの説明に
Pylint is a python tool that checks if a module satisfies a coding standard. Pylint can be seen as another PyChecker since nearly all tests you can do with PyChecker can also be done with Pylint. But Pylint offers some more features, like checking line-code's length, checking if variable names are well-formed according to your coding standard, or checking if declared interfaces are truly implemented, and much more (see the complete check list).
The big advantage with Pylint is that it is highly configurable, customizable, and you can easily write a small plugin to add a personal feature.
と書いてある。ふむふむ、どうやらPyCheckerと機能的には同じ?らしい。でも、こっちの方がより厳しい(Line長や変数名のチェックなど)らしい?(適当な翻訳

)...では、早速インストール。インストールする最新版(latest version published: 0.12.2)では、
logilab-astng (version >= 0.14)
logilab-common (version >= 0.13)
optik (only for python < 2.3)
が必要のようだ(PyLintのREADMEのページにリンクあり)
■optik
$ tar xvf optik-1.5.3.tar
$ cd optik-1.5.3
$ sudo python setup.py install
Password:*****
■logilab-common
$ tar xvf logilab-common-0.21.2.tar
$ cd logilab-common-0.21.2
$ sudo python setup.py install
Password:*****
■logilab-astng
$ tar xvf logilab-astng-0.16.3.tar
$ cd logilab-astng-0.16.3
$ sudo python setup.py install
Password:*****
■PyLint
$ tar xvf pylint-0.12.2.tar
$ cd logilab-astng-0.16.3
$ sudo python setup.py install
Password:*****
PyCheckerと同じコードをかけてみると...
$ pylint units.py
No config file found, using default configuration
************* Module units
C: 67: Line too long (93/80)
C:122: Line too long (93/80)
C:152: Line too long (95/80)
C: 1: Missing docstring
PyChecker&PyLint
2007.02.11
Tips
Pythonのlintツールはないかと探していたところ、 PyChecker及び、PyLintっていうのがヒットした。
PyLintは、なにやら別のパッケージが必要なようだったので、とりあえず、PyCheckerをインストール!
インストール後、作成したソースにたいしてCheckerをかけたところ、特に問題など指摘されなかった。
サイトには、以下の内容がチェックできるって書いてある。
No global found (e.g., using a module without importing it)
Passing the wrong number of parameters to functions/methods/constructors
Passing the wrong number of parameters to builtin functions & methods
Using format strings that don't match arguments
Using class methods and attributes that don't exist
Changing signature when overriding a method
Redefining a function/class/method in the same scope
Using a variable before setting it
self is not the first parameter defined for a method
Unused globals and locals (module or variable)
Unused function/method arguments (can ignore self)
No doc strings in modules, classes, functions, and methods
本当に自分のコードに問題ないのか(ちょっと疑問?)
PyLintは、なにやら別のパッケージが必要なようだったので、とりあえず、PyCheckerをインストール!
$ tar xvf pychecker-0.8.17.tar
$ cd pychecker-0.8.17
$ sudo python setup.py install
Password:****
インストール後、作成したソースにたいしてCheckerをかけたところ、特に問題など指摘されなかった。
$ pychecker units.py
Processing units...
Warnings...
None
$
サイトには、以下の内容がチェックできるって書いてある。
No global found (e.g., using a module without importing it)
Passing the wrong number of parameters to functions/methods/constructors
Passing the wrong number of parameters to builtin functions & methods
Using format strings that don't match arguments
Using class methods and attributes that don't exist
Changing signature when overriding a method
Redefining a function/class/method in the same scope
Using a variable before setting it
self is not the first parameter defined for a method
Unused globals and locals (module or variable)
Unused function/method arguments (can ignore self)
No doc strings in modules, classes, functions, and methods
本当に自分のコードに問題ないのか(ちょっと疑問?)
Python2.5対応のiPython
2007.02.10
Tips
iPython(http://ipython.scipy.org/moin/)には、最新のPython2.5に対応したパッケージは、ないようだったが、どうもバージョン0.7.3でOKらしい(http://www.nabble.com/Ipython-and-python2.5-t3095774.html)
早速ダウンロード&インストール!
掲載サイトにあったとおり、問題無く動作した。
ちなみに私の環境は、以下のとおり...
MacOSX 10.4.8
G4/800MHz
早速ダウンロード&インストール!
tar -xvzf ipython-0.7.3.tar.gz
cd ipython-0.7.3
python2.5 setup.py build
sudo python2.5 setup.py install
掲載サイトにあったとおり、問題無く動作した。
ちなみに私の環境は、以下のとおり...
MacOSX 10.4.8
G4/800MHz





