# -*- coding: utf-8 -*- import twitter #http://code.google.com/p/python-twitter/ api = twitter.Api(username='USERNAME',password='PASSWORD') statuses = api.GetDirectMessages() for s in statuses: print "(%s) %s: %s" % (s.created_at,s.sender_screen_name,s.text) #status = api.PostUpdate('This python-twitter module makes accessing twitter amazingly easy. Neat!') #print status