[PyKDE] Re: IOSlaves in Python?

Jim Bublitz jbublitz at nwinternet.com
Sun Jun 29 08:35:01 BST 2003


On Saturday June 28 2003 15:13, David Boddie wrote:
> It's bad form to reply to one's own messages, I know, but I've
> made some progress and the topic is still warm...

> > On Fri, 27 Jun 2003 18:35:19, David Boddie wrote:

> > On Thursday 26 June 2003 23:19, Jim Bublitz wrote:
> > > There are a couple of tutorials at:
>
> > > http://www.heise.de/ct/english/01/05/242/
> > > http://developer.kde.org/documentation/design/kde/ioslaves
> > >/framework.html
> > > http://developer.kde.org/documentation/design/kde/ioslaves
> > >/introduction.h tml

> > Yes, I'd seen these. They appeared to be aimed at the
> > developer who will be using rather than developing IOSlaves.

> The c't tutorial actually turned out to be quite useful in the
> end, although I haven't really found a definitive reference on
> the subject.

> > Thanks for the tips. There appears to be a tool for testing
> > IOSlaves in kdelibs/kio/tests/ directory which I'll look at.
> > It'll be easier than using Konqueror to test with.

> > Initial results with kioslavetest indicate that I can return
> > the MIME type and some basic text in response to a "get"
> > operation. I wonder what else Konqueror is expecting that I
> > can't see at the moment.

> I'm not sure what exactly I did to get through to Konqueror
> but I can now browse an imaginary directory structure stored
> in a hierarchical list in my SlaveBase subclass.

Cool!

> I'll try implementing a reasonable example IOSlave which
> provides all the main operations (get, put, copy, etc.) before
> doing anything really serious.

> I'd like to distribute this initial IOSlave as an example but
> it'll need to be configured using autoconf or DistUtils. I
> once used some sort of KDE project template builder to
> generate configuration files for a project; can anyone point
> me in the direction of this tool or even tell me where I'm
> likely to find it?!

There was a project builder for KDE that bit the dust when they 
changed autoconf versions a while back (a little over a year ago 
I think). I don't know if it's been updated.  Both PyKDE and 
PyQt use qmake and I'm not aware of any problems due to that 
choice - qmake supports a wide array of platforms (if you're not 
familiar with, it's free from TrollTech and the docs are 
included with the rest of the Qt docs). It's considerably easier 
than autoconf and IMHO easier than distutils too.

PyKDE and PyQt use similar versions of build.py to essentially 
replace ./configure and rewrite the qmake files (and then 
generate Makefile via qmake) You're welcome to borrow from 
build.py if you follow the license (GPL'd), although you 
probably won't need to be as complicated. PyQt's version is 
easier to follow; PyKDE's version adds KDE directory locating 
and versioning (and steals a lot of code from the PyQt version).

Of course that won't build a libtool lib as far as I know, if 
that's a requirement. I'm not sure if the libtool-generated .so 
differs from a non-libtool .so. If not, generating the .la file 
via Python would be pretty easy.


Jim




More information about the PyQt mailing list