Hi,

I want to list directory contents using IOSlaves so I can transparently use file://, fish:// or whatever. So my attempt looks like:

        #!/usr/bin/env python

        import sys
        from qt import QObject,SIGNAL
        from kdecore import KApplication,KURL
        from kio import KIO

        class App(KApplication):
                def slotEntries(self,listjob,entries):
                        print('slotEntries called...')
                        print 'entries:', type(entries)
                        #loop comes here to eval entries
                def slotResult(self,listjob):
                        print('slotResult called...')
                        self.quit()

        app=App(sys.argv, "KIO testing")
        urlDir = KURL("fish://[EMAIL PROTECTED]/home/")
        #jobs = KIO.listDir(urlDir)
        jobs = KIO.ListJob(urlDir,0)

        QObject.connect(jobs,SIGNAL("entries(KIO::Job*,const KIO::UDSEntryList&)"),app.slotEntries);
        QObject.connect(jobs,SIGNAL("result(KIO::Job*)"),app.slotResult);

        app.exec_loop()


When the slot slotEntries is executed, it throws the following:
        entries: <type 'NotImplementedType'>

So it seems that there is no class KIO::UDSEntryList mapped to PyKDE, but in the PyKDE documentation there IS documentation for KIO::ListJob, so maybe the problem is another one.

My technical specs:
        OS: Kubuntu/Breezy
        KDE: 3.5
        PyKDE: 3.11
        pyQT: 3.14
        SIP: 4.2

Any help is appreciated!
Thank you.
JIS.

P.D: This are my first steps in python and kde programming, so please be patient. Thank you!

       
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to