![]() |
Python AddressBook via evolution
Hello. I am creating my first python script for maemo. It just analyzes my address book and deletes some contacts, that i don't need. The problem is, that i just cant get icq, jabber, or other aim id's. No problems though, getting email or name fields.
Here is bit of my code Code:
import evolution According to help( icq[0] ) problem is that property 'im-icq' holds GPointer to list of icq id's. And properties such as 'email-1' hold gchararray, which can be treated by python as string. Also properties such as 'im-icq-home-1',...,'im-icq-work-3' are always None for my contacts. I am not expert on gtk and its object model, and I couldn't find how I can treat these lists in python. Hermes app just handles contacts as objects, but doesn't access properties such as icq id's. The only solution, I could find, is getting id's from vcard string via get_vcard_string(), but it seems sooo ugly... PS just found thread http://talk.maemo.org/showthread.php?t=47840 it seems, that guys decided to parse vcard string and couldn't find better solution, that's sad(( |
Re: Python AddressBook via evolution
Aww crap. Spent an hour digging stuff up and scratching my head, should of read this first :D Was trying to dig up Jabber contacts with a Python script, thought it was going to be just a few lines of code... :P
|
All times are GMT. The time now is 17:11. |
vBulletin® Version 3.8.8