Created
May 24, 2013 17:18
-
-
Save sbussard/5645045 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this line at the end of the file | |
python ~/.psam.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print prodigalsam's latest tweet | |
import json, urllib2 | |
a = urllib2.urlopen('https://api.twitter.com/1/statuses/user_timeline.json?screen_name=prodigalsam&count=1').read() | |
b = json.loads(a) | |
print '\n' + b[0]['text'] + '\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
download
.psam.py
to your home directory on your mac and addpython .psam.py
on the last line of of your~/.profile
file…if you don't know how to do that, then you shouldn't because you'll never see it in action anyways ;)