Re: [Evolution-hackers] Accessing EDS in Python
- From: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
- To: David Klasinc <bigwhale lubica net>
- Cc: evolution-hackers gnome org
- Subject: Re: [Evolution-hackers] Accessing EDS in Python
- Date: Thu, 28 Jul 2011 13:33:10 +0100
On Sun, 2011-07-24 at 21:42 +0200, David Klasinc wrote:
> Greetings,
>
> I am trying to do a simple search in the address book, this is the code
> that refuses to work:
>
> #!/usr/bin/python
>
> from gi.repository import EBook
>
> contacts = []
>
> # Initialize client and open it
> client = EBook.BookClient.new_system()
> # Set the query
> query_string = "(contains \"full_name\" \"N\")"
>
> print "Look for:", query_string
>
> # Get some contacts!
> ret = EBook.BookClient.get_contacts_sync(client, query_string, contacts,
> None)
>
> print contacts
>
> if not ret:
> print "*sob*"
>
Also, as pointed out by Milan on irc, your code is missing a call to
open_sync().
Though you might consider making everything async.
Cheers,
Raul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]