[PyKDE] PB to compile PyKDE-3.3.2

Jim Bublitz jbublitz at nwinternet.com
Wed Feb 12 18:35:01 GMT 2003


On 12-Feb-03 Gerard Breiner wrote:
> Indeed, it is about kde 2.2.1.
> I replaced in sip/kstddirs.sip kde 2.2.1 by kde 2.2.2 and run
> again build.py and "make" and  "make install".

I'm not sure this will work unless you're also linking with KDE
2.2.2 libs - there's no way to resolve the reference to the method
that doesn't exist in 2.2.1. Commenting or versioning out the method
would be the better method.

You can verify if this is a problem by doing an "import kdecore" in
the interpreter.

> No more problems.
> test  in interpreter python :
> from kdecore import kapp   (ImportError: cannot import name kapp)

kapp is defined as follows in kapp.h:

   #define kapp KApplication::kApplication()

gcc 2.96 on RH has problems with the code sip generates for this,
so kapp has been dropped from PyKDE. You can do

    from kdecore import KApplication

and then:

    kapp = KApplication.kApplication ()

anywhere you need kapp in Python.

> from kdecore import DndURL (ImportError: cannot import name
> DndURL)

I couldn't find a DndURL symbol in the KDE kdecore sources or
anywhere in the kdelibs sources for KDE 2.2.1

> from kdeui import KTreeList  (ImportError: cannot import
> name KTreeList )
> from kdeui import KTreeListItem  (ImportError: cannot import name
> KTreeListItem )
> from kdeui import KTabListBox (ImportError: cannot import name 
> KTabListBox)

I couldn't find either KTreeList, KTreeListItem or KTabListbox
anywhere in kdeui or in the kdelibs sources for KDE 2.2.1.

> from kdeui import  KMsgBox (ImportError: cannot import name  
> KMsgBox)

You probably want KMessageBox - I'm not aware of any KMsgBox class
in the KDE libs.
 
> an idea please ?

Are the above from KDE 1 by any chance? They look familiar.

The KDE class ref docs are at:

http://developer.kde.org/documentation/library/libraryref.html

These will tell you what classes/methods are available in KDE for
each version. The docs that accompany PyKDE will tell you which
classes/methods are or are not implemented, and any changes in
arguments or return values from the comparable C++ method.

To test your installation, try to import each module you want to
use in the interpreter. For example:

>>> import kdecore
>>> import kdeui
>>> import kio
etc.

Also try running:

> python pykless.py



More information about the PyQt mailing list