473,698 Members | 2,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2449

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(msn p.SessionCallba cks):
def friend_list_upd ated(self, friend_list):
print 'Got friend list update:', friend_list.lis ts

msn = msnp.Session(Ms nListener())
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
1078
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 chats, but we can't figure out how MSN is adding the multiple invites. Any help would be greatly appreciated!
5
2324
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 up the class link and tel_list. I set up a class person with strings for name, town, and number. I just don't know how to set up the classes w/ their methods (constructors and operations). I'm stuck on the assignment operator and the add and...
5
6249
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++ with my defined classes to be added to linked list structure so as to facilitate the operation of all instances of defined classes. Is that possible to apply such classes to <list> or <Vector> structure? Thanks!
6
1880
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 first listbox i mean user selects listbox then approprieate records should be come in second listbox.can i do it with javascript? i.e if user selects list item 'class bca' then all the records related to 'class bca' should come to
1
1769
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" which always points to the last pointer in the list instead of to the last node. All additions to the list are made by following the reference pointer. The reference pointer starts off pointing to the head pointer. Later, it points to the .next...
22
8034
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 solution. Being that recursion is frowned upon in embedded software, the answer was not what the interviewer expected, but alas it was correct. I asked some friends how they would have answered and another answer is to reverse the list and then...
15
3422
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 decide which one is the best. The problem being: "Remove all occurrences of a character (case insensitive) from a given string" eg. i/p: She will be a massless princess o/p: he will be a male prince (all occurances of 's' removed)
9
19837
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 list boxes,now whenever user fill any value(email-Id) to textarea and press submit button then value going to listbox. These values are one or multiple , then they goes into list box , In list box these values are store in array . I mean user...
3
1592
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 comma. The clearest I could come up with in Python is below. I wonder if there is a more pythonic solution for this problem. Maybe something recursive? Greetings,
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9026
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.