2010年6月20日日曜日

matplotlib

matplotlibはPythondeグラフが使えるようになるモジュール。

まずはnumpyを入れる。

easy_install numpy

インストール時にかなりのエラーがでるが、無視。

http://matplotlib.sourceforge.net/index.html
https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/

からインストーラーをダウンロードしてインストール。

サンプルはhttp://matplotlib.sourceforge.net/gallery.html#にいっぱいあるし。
楽しいね。



2010年6月16日水曜日

AndroidでPython カメラで写真を撮って自動保存

import android
import time

droid = android.Android()

fileName = time.strftime("%Y%m%d%H%M%S")

droid.cameraTakePicture('/sdcard/My Documents/' + fileName + '.jpg')

print 'end'