On Feb 18, 2005, at 7:31 AM, jr wrote:
I'm currently using the msnp.py code from Manish Jethani's project. I havn't been able to get the friends list to update like it should. it works once out of about every 25 times the program loads.
Has anyone been able to implement his code and get the friends list to actively update? Or have any suggestions?
I just spent a few minutes experimenting, and it seems that the following code does what you would like:
import msnp import time
class MsnListener(msnp.SessionCallbacks): def friend_list_updated(self, friend_list): print 'Got friend list update:', friend_list.lists
msn = msnp.Session(MsnListener()) msn.login('[EMAIL PROTECTED]', 'xxxxxxx') msn.sync_friend_list()
while True: msn.process() time.sleep(1)
Any info would be great. Thanks.
Hope this helps,
Mark Rowe <http://bdash.net.nz/>
-- http://mail.python.org/mailman/listinfo/python-list