maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to check if a phone number exist in address book with python? (https://talk.maemo.org/showthread.php?t=71550)

khuong 2011-03-27 19:46

How to check if a phone number exist in address book with python?
 
How to write simplest and fastest python script to check for a phone number if it exists in the n900 addressbook at all?

Here's what i came up so far; I don't know if it will works or not since i just started learning python, any suggestion will be greatly appreciated.

Code:


import evolution.ebook as e

phonenumber="18007775555"

def check_phone_number(number):
  query = e.EBookQuery.from_string("(exists \"number\")")
  if query == None:
    return No
  return Yes

print check_phone_number(phonenumber)


m750 2011-03-28 18:22

Re: How to check if a phone number exist in address book with python?
 
Try to look at:
http://wiki.maemo.org/PyMaemo/Access...ython_bindings


All times are GMT. The time now is 10:45.

vBulletin® Version 3.8.8