From kde-pim Wed Dec 08 22:06:00 2010 From: Ignacio Lorenzo =?iso-8859-1?q?Garc=EDa?= Date: Wed, 08 Dec 2010 22:06:00 +0000 To: kde-pim Subject: [Kde-pim] Akonadi Resource in python Message-Id: <201012082206.00300.nacholore () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-pim&m=129184604102399 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_IFAANc/KUtuiTP+" --Boundary-00=_IFAANc/KUtuiTP+ Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm creating a resource akonadi in python, I get segmentation fault when I try to create Akonadi.ResourceBase.__init__(self, QString(id)) Does anyone help me? Thanks you --Boundary-00=_IFAANc/KUtuiTP+ Content-Type: text/x-python; charset="UTF-8"; name="pruebat.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pruebat.py" #!/usr/bin/env python from PyKDE4.akonadi import * from PyQt4.QtCore import QString, qDebug import getopt, sys class FbResource( Akonadi.ResourceBase ): def __init__(self, id = None): qDebug(" Llego %s" % (id)) Akonadi.ResourceBase.__init__(self, QString(id)) qDebug(" Llegue hasta aqui ") # qDebug(" Name %s" % (self.name())) def retrieveCollections( self ): qDebug(" It is retriveCollections") c = Akonadi.Collection() c.setParent(Akonadi.Collection.root()) c.setRemoteId("fb-contacts"); c.setName(QString('fb')); mimeTypes = QStringList('text/directory') c.setContentMimeTypes(mimeTypes) list = [c] collectionsRetrieved(list) Akonadi.ResourceBase.synchonizeCollectionTree() def main(): try: opts, args = getopt.getopt(sys.argv[1:], "" , ["identifier="]) except getopt.GetoptError: usage() sys.exit(2) for o, a in opts: qDebug(" Opciones %s = %s" %( o, a)) if o in ("--identifier"): fb = FbResource(a) # fb.synchronizeCollectionTree() if __name__ == "__main__": main() --Boundary-00=_IFAANc/KUtuiTP+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KDE PIM mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim KDE PIM home page at http://pim.kde.org/ --Boundary-00=_IFAANc/KUtuiTP+--