[PyKDE] Network Transparency Help

Paul Waldo pwaldo at waldoware.com
Tue May 16 12:30:10 BST 2006


On Tuesday 16 May 2006 2:19 am, Jim Bublitz wrote:
> >     def locateFiles(self):
> >         startUrl = KURL(self._url)
> >         job = KIO.listRecursive(startUrl)
> >         QObject.connect(job, SIGNAL("entries(KIO::Job *,
> > 		const KIO::UDSEntryList &)"), self.newItems)
> >
> >     def newItems(job, list):
> >         print job
> >         print list
> >
> >
> > When I create an instance of FileLocator and call its locateFiles method,
> > I get a progress dialog that hangs around for a while, but newItems()
> > never gets called.  I was expecting that once listRecursive() found all
> > the files, newItems() would be called with all of the found items in
> > list.
> >
> > Any help or links to examples would be greatly appreciated!
>
> Have you tried using self.job in locateFiles()?
>
> Jim

Thanks for the reply, Jim.  My impression from the KDE API docs as well as 
other sources is that the job, as created in locateFiles, is fairly worthless 
(at this point).  Let's say that I want to find all of the 10,000 files on a 
remote machine over a 28.8 kbps dialup line.  While a painful plan :-), this 
may be something the user really needs to do.  The UI should not hang for the 
10 minutes it would take to do this operation, hence the callbacks.  My 
impression is that once some files have been located by KDE, the newItems 
method would be called by KDE to indicate it found some files.  If I am 
wrong, please let me know!




More information about the PyQt mailing list