![]() |
python evolution - not all phone numbers show up
Hi all,
I need to generate a list of contactas and a corresponding list with phone numbers for my program www2sms. So far I came up with this solution: Code:
#!/usr/bin/env pythonHas anyone an idea? Thanks a lot Bjoern |
Re: python evolution - not all phone numbers show up
Okay, I ran into another problem.
What happens if a contact hast more numbers assigned to the category "Mobile" or "Mobile (home)" .... In the case I showed above, only the last number for "Mobile" is shown. So how to deal with multiple numbers assigned to one "category" Any suggestions? Cheers Bjoern |
Re: python evolution - not all phone numbers show up
Quote:
Did you find any solution to this? |
Re: python evolution - not all phone numbers show up
Quote:
If you use Code:
#!/usr/bin/env pythonI am still stuck. Any hint, idea, solution is welcome Desperately, Bjoern |
Re: python evolution - not all phone numbers show up
Is it normal I have no contacts returned by the method?
Code:
In [1]: import evolution |
Re: python evolution - not all phone numbers show up
Quote:
Code:
>>> contactsKind regards Bjoern |
Re: python evolution - not all phone numbers show up
Hmm.. Maybe let's define "Addressbook" first to make it clear what it is..
I thought it's the app called "Contacts" with my ... eee... contacts I can call ;) Isn't it? So I have ~350 including Skype, Jabber.. I have installed python-evolution using plain: apt-get install python-evolution. It didn't come with python2.5 by default. T. Code:
Nokia-N900-51-1:~/.osso-abook$ pwd |
Re: python evolution - not all phone numbers show up
Did you try to run my code from my first or third post "exactly" just to be sure.
If this results in an empty list, something is wrong on your phone :confused: Just paste the code into a file an run it directly on the phone. |
Re: python evolution - not all phone numbers show up
;) I've found the reason...
=username I log with different username, though the same UID as 'user' That's the reason. Library can't find /home/*/.osso/* When logged as 'user' I get proper results :) Code:
Nokia-N900-51-1:~/MyDocs/.images/40d$ sudo gainroot:) |
Re: python evolution - not all phone numbers show up
All right Bjoern - back to the topic...
Looks like on my phone your code is quite all right. It retrieves Phone (home) correctly from one of my addressbook contacts. Code:
contacts = abook.get_all_contacts()What is strange, is that in the contact itself I have only 2 phone numbers: Mobile and Phone (home). But in the result from ebook...get_property(*) you can see 3 numbers returned. I don't know why it gave 2 entries for the same phone number (other-phone == home-phone) It doesn't cause any trouble for me, so I'm all right with this.. Hope it helps. And thanks to you for starting the post. I now can retrieve contact info based on the phone for my new apps .. :-D Tomasz |
| All times are GMT. The time now is 11:25. |
vBulletin® Version 3.8.8