2 comments

[ 2.3 ms ] story [ 15.3 ms ] thread
And in python it takes 8 lines:

    import wrapper
    ts = wrapper.Twitter()
    user = 'scorpion032'
    diff= set(ts.friends.ids(screen_name=user)) - set(ts.followers.ids(screen_name=user))
    for i in diff:
	try: non_fol1 = ts.users.show(id=i)
	except: continue
	print "%s with %d followers and %d following" %(non_fol1['name'],non_fol1['followers_count'],non_fol1['friends_count'])
I can't find `wrapper` module. The relevant blog post [1] refers to `twitter` module (available via `$ easy_install twitter`)

  """Print info on twitter friends that are not following back.
  
  """
  from twitter import Twitter
  
  t = Twitter()
  creds = dict(screen_name='scorpion032')
  non_followers = set(t.friends.ids(**creds)) - set(t.followers.ids(**creds))
  for id in non_followers:
      user_info = t.users.show(id=id)
      print "%(name)s with %(followers_count)d followers "\
            "and %(friends_count)d following" % user_info

[1] http://becomingguru.com/2009/05/awesome-python-twitter-libra...