access abook addressbook with curses

Ben C spamspam at spam.eggs
Sat Aug 5 15:19:30 EDT 2006


On 2006-08-05, Fabian Braennstroem <f.braennstroem at gmx.de> wrote:
> Hi,
>
> I want to get access to my abook address file with python.
> Does anyone have some python lines to achive this using
> curses? If not, maybe anybody has small python program doing
> it with a gui!?

You can just parse the abook addressbook with the ConfigParser, try
this:

import os
from ConfigParser import *

abook = ConfigParser()
abook.read(os.environ["HOME"] + "/.abook/addressbook")

for s in abook.sections():
    print abook.items(s)



More information about the Python-list mailing list