2015-02-06から1日間の記事一覧

Python インストール済みのモジュール一覧表示

>pydoc modules か >python -c "help('modules')"

Python SQLite3 からのデータ読み出し

import sqlite3 db = ("mydb.db") con = sqlite3.connect(db)con.row_factory = sqlite3.Row cur = con.cursor()cur.execute("select * from mydb order by hoge") rows = cur.fetchall() for row in rows: print unicode(row["hoge"]) print unicode(row[0]…