472,950 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,950 software developers and data experts.

msnp, friends list

jr
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?

Any info would be great.
Thanks.

Jul 18 '05 #1
4 2359

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('x*******@xxxx.com', '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/>

Jul 18 '05 #2
jr
Sorry, I guess what I meant to ask was the status of the friends in the
friends list begin updated. Right now we have a friends list which is
being populated with the correct users, but their status (online,
offline) is never getting set. For some reason the events aren't being
fired??

Jul 18 '05 #3

On Feb 18, 2005, at 11:35 AM, jr wrote:
Sorry, I guess what I meant to ask was the status of the friends in the
friends list begin updated. Right now we have a friends list which is
being populated with the correct users, but their status (online,
offline) is never getting set. For some reason the events aren't being
fired??


Ok, I've seen this problem before. Basically, the MSN servers do not
send state changes for your buddies if you change your status from
offline -> online before you have retrieved your entire buddy list.
There doesn't appear to be a way around that with msnp as it always
changes your state after sign-in, and it fails to group the buddy list
state into a single transaction so that you can tell when the entire
list has been retrieved... It should be relatively simple to adapt the
code to fix the problem.

Regards,

Mark Rowe
<http://bdash.net.nz/>

Jul 18 '05 #4
jr
Mark,
Thank you so much for that information. Been struggling with this issue
for quite some time now. A simle line comment on line 647 of session.py
solves all problems :)
this line sets your status to online and does not get time (usually) to
get friends list correctly.

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sparda713 | last post by:
I'm currently using the msnp.py module in a project. We are trying to implement a group chats feature. Has anyone had any success in doing this or know how to do this? We have it doing single...
5
by: Darryl B | last post by:
I can not get anywhere on this project I'm tryin to do. I'm not expecting any major help with this but any would be appreciated. The assignment is attached. The problem I'm having is trying to set...
5
by: Kenneth | last post by:
<list> seems to be a powerful structure to store the related nodes in memory for fast operations, but the examples I found are all related to primitive type storage. I'm doing a project on C++...
6
by: hardik | last post by:
hi friends i am very new to java script.if anyone can help me out then i will be thankful. i am using php and mysql in my learning project and i have two list boxes,now whenever user presses...
1
by: codergem | last post by:
Helo friends!! I m having problems in understanding that how every node is added at last.Could anyone explain me this in much better manner. Well here it is.... we use a local "reference pointer"...
22
by: joshc | last post by:
In an interview for an embedded software position recently I was asked to write code, in C, for printing the contents of a linked list backwards. After a few minutes I came up with the recursive...
15
by: getsanjay.sharma | last post by:
Hello there my friends, this is my first attempt at posting in a newsgroup. Here is my problem statement: Me and my friend decided to solve a programming problem with our own styles and then...
9
by: Ajinkya | last post by:
Hello friends ! , I am very new to java script.If anyone can help me then I will be very very thankful to his/her. I am using php and mysql in my project and I have one textarea and one...
3
by: Michiel Overtoom | last post by:
Paul & Robert wrote... I occasionally have a need for printing lists of items too, but in the form: "Butter, Cheese, Nuts and Bolts". The last separator is the word 'and' instead of the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.