Pythonで手始めに色々やった忘備録
やろうとしたこと
とりあえず
MacPortsをインストール
https://distfiles.macports.org/MacPorts/
僕はパッケージでインストールしました。
setuptoolsをインストール
sudo port install py27-setuptools
easy_installをインストール
$ which easy_install-2.7
/opt/local/bin/easy_install-2.7
pipをインストール
$ sudo easy_install pip
http://d.hatena.ne.jp/rudi/20110107/1294409385
Djangoをインストール
$ sudo easy_install-2.7 httplib2
Twitterあそび
httplib2をインストール
$ sudo easy_install-2.7 httplib2
oauth2をインストール
$ pip install oauth2
simplejsonをインストール
$ pip install simplejson
python-twitterをインストール
$ pip install python-twitter
$ python
>import twitter
>api = twitter.Api()
>statuses = api.GetUserTimeline("your_twitter_account")
> print [s.user.name for s in statuses]
これで自分のTLもってこれました。めんどかったです