# Path: contacts/contacts.py
# PHONE_PREFIX = "tel:"
# class Contact(pisiinterfaces.Syncable):
# class AbstractContactSynchronizationModule(pisiinterfaces.AbstractSynchronizationModule):
#     def __init__(self, id, attributes):
#     def compare(self,  contactEntry):
#     def __init__(self,  verbose,  soft,  modulesString,  config,  configsection,  name = "unkown contact source"):
#     def allContacts( self ):
#     def getContact(self,  id):
#     def flush(self):
#     def addContact( self, contactInstance ):
#     def replaceContact( self, id, updatedContact):
#     def removeContact( self, id ):
#     def _prefixNumbers(self, atts):
#     def _dePrefixNumbers(self, atts):
# def _safeString(st,  replacement = ""):
# def assembleID(contactAtts):


import os.path
import sys,os,re
import ldap
import pisiprogress
from contacts import contacts
I couldn't find any pre-compiled package of either of the two - so I had to compile and install everything myself (what a mess). I found the following sources helpful:
 - http://wiki.openmoko.org/wiki/Toolchain
 - http://www.open-moko.de/die-software-anwendungen-f6/libsdl-und-crosscompiler-t25.html (in German)
Hopefully, in near future an LDAP as well as a Python-LDAP ipkg will be available.

Special characters (such as umlauts) seem to result in an error being thrown. This is due to some unicode encoding problem.
ToDo: Resolv this issue!

Please note, that currently, only read access to LDAP is implemented.

This file is part of Pisi.

Pisi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Pisi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Pisi.  If not, see <http://www.gnu.org/licenses/>
"""


# Allows us to import contact
sys.path.insert(0,os.path.abspath(__file__+"/../.."))


# Path: contacts/contacts.py
# PHONE_PREFIX = "tel:"
# class Contact(pisiinterfaces.Syncable):
# class AbstractContactSynchronizationModule(pisiinterfaces.AbstractSynchronizationModule):
#     def __init__(self, id, attributes):
#     def compare(self,  contactEntry):
#     def __init__(self,  verbose,  soft,  modulesString,  config,  configsection,  name = "unkown contact source"):
#     def allContacts( self ):
#     def getContact(self,  id):
#     def flush(self):
#     def addContact( self, contactInstance ):
#     def replaceContact( self, id, updatedContact):
#     def removeContact( self, id ):
#     def _prefixNumbers(self, atts):
#     def _dePrefixNumbers(self, atts):
# def _safeString(st,  replacement = ""):
# def assembleID(contactAtts):


# Path: modules/contacts_ldap.py
import os.path
import sys,os,re
import ldap
import pisiprogress
from contacts import contacts

I couldn't find any pre-compiled package of either of the two - so I had to compile and install everything myself (what a mess). I found the following sources helpful:
 - http://wiki.openmoko.org/wiki/Toolchain
 - http://www.open-moko.de/die-software-anwendungen-f6/libsdl-und-crosscompiler-t25.html (in German)
Hopefully, in near future an LDAP as well as a Python-LDAP ipkg will be available.

Special characters (such as umlauts) seem to result in an error being thrown. This is due to some unicode encoding problem.
ToDo: Resolv this issue!

Please note, that currently, only read access to LDAP is implemented.

This file is part of Pisi.

Pisi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Pisi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Pisi.  If not, see <http://www.gnu.org/licenses/>
"""


# Allows us to import contact
sys.path.insert(0,os.path.abspath(__file__+"/../.."))


class SynchronizationModule(contacts.AbstractContactSynchronizationModule):