otsune's SnakeOil RSSフィード

python -c "print''.join([chr(x) for x in 111&1101,110+~-~11,10^11*11,110+~-~11,-~101,-~11^11*11,~-110,111&11*11,11+11+10,11|~-0110,1-~11^11*11,10^11*11,-~11^11*11,110,101])"

2006-06-21

Pythonで予約語を出力するには

|  Pythonで予約語を出力するには - otsune's SnakeOil  を含むブックマーク はてなブックマーク -  Pythonで予約語を出力するには - otsune's SnakeOil   Pythonで予約語を出力するには - otsune's SnakeOil  のブックマークコメント

>>> __import__('keyword').kwlist

['and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield']

computerworld.jpとteacup AutoPageのEntryFullText

 computerworld.jpとteacup AutoPageのEntryFullText - otsune's SnakeOil  を含むブックマーク はてなブックマーク -  computerworld.jpとteacup AutoPageのEntryFullText - otsune's SnakeOil   computerworld.jpとteacup AutoPageのEntryFullText - otsune's SnakeOil  のブックマークコメント

computerworld_jp.yaml

# upgrade http://www.computerworld.jp/rss/rss.rdf
author: Masafumi Otsune
handle: http://www\.computerworld\.jp/news/
extract: <!-- latest news -->(.*?)<!-- /latest news -->
extract_capture: body

ap_teacup_com.yaml

# upgrade http://autopage.teacup.com/
author: Masafumi Otsune
handle: http://\w+\.ap\.teacup\.com/\w+/\d\.html
extract: (<div class="postbody">.*?)<div class="postcommtb">
extract_capture: body

こういう合理的な構造のサイトだったらextractは簡単。

トラックバック - http://subtech.g.hatena.ne.jp/otsune/20060621