re(正規表現)/テスト /エラー・例外・報告処理 / 日時 datetime
ファイルとか
単純文 (simple statement)
関数
- 可変長引数
- アスタリスクが先頭につくと可変
- "*"でリストで受け取る
- "**"でディクショナリで受け取る
演算
tuple
collection
- list
- list型
hdknr@deb09:~$ python Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> list <type 'list'>
- リスト連結(extend), +
- sort()で並べ替え
- コピー
- list型
- map/dictionary
- dict型
>>> dict <type 'dict'>
- 初期化
>>> dict(a='a',b='b') {'a': 'a', 'b': 'b'} - zip()つかってリスト化して
>>> zip(['a','b'],[1,2]) [('a', 1), ('b', 2)] >>> dict(zip(['a','b'],[1,2])) {'a': 1, 'b': 2}
- 初期化
- コピー
- iteritems()でワンライナー
- a_dict.update(other_dict) で連結(上書き)
- iteritems(), re.sub , dict : 辞書のキーワードから文字を取り除く
- dict型
generator
Decorator
Web
- urllib/urllib2
- urlencode
- urlencodeはunicodeを直接encodeできないらしい
- urlencodeはunquote_plusで戻す
XML
- PyXMLSec - Python XML Security
- lxml
- Link:BeautifulSoup
- "Beautiful Soup is a Python HTML/XML parser designed for quick turnaround projects like screen-scraping. "
- Link:python+libxml2
- python-libxml2(xml2,xslt) Install on Debian
- python-libxml2 Install for Windows
- python-libxml2 Install on Fedora
- yumでPython2.4,Python2.5ともいけるようです。
- ElementTree
- Universal Feed Parser
- feedparser(on Vista) to process RSS/Atom feed
Serialization
- YAML
- JSON
Security
- X.509
- M2Crypto
- pycrypto
- hash
- OpenSSL
- pyOpenSSL at SourceForge
- pyOpenSSL : install & check on Debian (ソースインストールと確認)
- Python/OpenSSL/certs.py : openssl コマンドをcommands でラップしたしょぼツール]
Database
文字列操作
- rstrip()でchomp
- キャラクター <=> 16進表現
- バイナリデータと ASCIIデータとの間での変換
- b2a_hex : a2b_hex
Encodings
- ファイルエンコーディング(PEP-0263)
# -*- coding: utf-8 -*-
- rot13
Imaging
- Link:PIL Python Imaging Library
iPython
Cython
- install
Diagnosis
その他
- Install
- Pythonモジュールインストール / Distutils
- Python/__builtins__ - ビルトインモジュール
- Python/Class - クラスシステム
- Python/Functional - 関数言語プログラミング
- PEP
- UUID
- 形態素解析
- コマンド実行
- Django Webフレームワーク / djangoパッケージ / DjangoCamp
- ワンライナー/oneliner
- setuptools / distutils
- Debianでのpython2.5でのインストール
- Fedoraで"ditutils"
- 直接ダウンロード(Windowsとか)
- 環境
- キーボード
- 特異メソッド
- Portable Python

