[PyKDE] PyKDE Snapshot - sip bug?

Phil Thompson phil at riverbankcomputing.co.uk
Wed Apr 26 14:17:59 BST 2006


On Tuesday 25 April 2006 10:14 pm, Jim Bublitz wrote:
> On Tuesday 25 April 2006 12:59, Mathieu Bouchard wrote:
> > Hi,
> >
> > I've tried the latest snapshot of pykde with sip 4.4.2 and  pyqt 3.16 and
> > almost everything is working fine.
> >
> > In fact, I'm only having some problems with the KIO namespace. With the
> > latest snapshot of pykde, I was doing :
> > ...
> > from kio import KIO
> > copy_job = KIO.file_copy(file_path, tmp_file)
> > ...
> > but with the latest snapshot, file_copy is not part of KIO.
> > I've checked the sip files for kio and the file_copy method is defined in
> > sip/kio/job.sip while the remaining of the KIO namespace is defined in
> > multiple files.
> >
> > When creating the KIO namespace, it seems that only the file
> > sip/kio/global.h is used.
> >
> > I don't know if I'm doing something wrong, because I'm not following
> > every changes of pykde
>
> sip doesn't seem to be generating any code for functions declared in a
> namespace - none I could find. For example, from PyKDE/sip/kio/job.sip:
>
> namespace KIO
> {
>    ...
>    KIO::FileCopyJob*    file_copy (const KURL&, const KURL&, int = -1, bool
> = 0, bool = 0, bool = 1);
>   ...
> };
>
> Classes declared in KIO work fine, so for example you could create a
> KIO.FileCopyJob directly (same constructor, but no defaults for the
> arguments) as a workaround. A short test program written using that works
> fine here, but KIO.file_copy produces an attribute error in Python.

Yes it's a SIP bug. Looks like 4.4.3 will be making an appearance soon...

Phil




More information about the PyQt mailing list