-
- def getContactNameFromPhone(self, phoneNum):
-
-
- addresses = evolution.ebook.open_addressbook('default')
- contacts = addresses.get_all_contacts()
-
-
- #ai = GList.new(ebook.e_contact_get_attributes(hash(self._contact), E_CONTACT_EMAIL))
-
- for econtact in contacts:
-
- try:
- #print econtact.get_name()
- phones = econtact.get_property('phone')
-
- phones_p=int(str(phones)[13:-1],16)
- phoneList = GList.new(phones_p)
-
- while phoneList.has_next():
- currPhone = string_at(phoneList.next())
-
- if currPhone == phoneNum:
- return econtact.get_name()
- except:
- continue
-
-
-