Skip to content

Instantly share code, notes, and snippets.

@sbussard
Created May 24, 2013 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbussard/5645045 to your computer and use it in GitHub Desktop.
Save sbussard/5645045 to your computer and use it in GitHub Desktop.
# add this line at the end of the file
python ~/.psam.py
# 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'
@sbussard
Copy link
Author

download .psam.py to your home directory on your mac and add python .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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment