[ create a new paste ] login | about

Project: python
Link: http://python.codepad.org/vrlLWYGY    [ raw code | fork ]

fedecarg - Python, pasted on Jun 14:
'''
Twitter Snnipet  
Find out who are you following that's not following you back
http://blog.davidziegler.net/

Dependencies python-twitter >= 0.6
http://code.google.com/p/python-twitter
'''
import twitter, sys, getpass, os

def call_api(username,password):
    api = twitter.Api(username,password)
    friends = api.GetFriends()
    followers = api.GetFollowers()
    heathens = filter(lambda x: x not in followers,friends)
    print "There are %i people you follow who do not follow you:" % len(heathens)
    for heathen in heathens:
        print heathen.screen_name
        
if __name__ == "__main__":
    password = getpass.getpass()
    call_api(sys.argv[1], password)


Create a new paste based on this one


Comments: