[PyKDE] dcop call always returns same value

Jim Bublitz jbublitz at nwinternet.com
Tue Jun 28 21:18:51 BST 2005


On Monday 27 June 2005 06:07, Sebastian Kügler wrote:
> Hi,
>
> While trying to interface the Kdesktop ScreensaverIface, I noticed an
> odd behaviour. If called via bash or kdcop,
>
> $ dcop kdesktop KScreensaverIface isEnabled
>
> would return the correct value, i.e. true or false whether I have
> checked "[ ] Start automatically" in kcmshell screensaver.
>
> Interfacing it via python, it _always_ returns "True", which to me seems
> a bug, but I may be doing something completely wrong ...
>
> Sample Script:
>
> # ---------------------------------------------------------------------

> # Following _always_ returns True :(
> is_enabled = kdesktop.KScreensaverIface.isEnabled()[0]

> Any ideas what's going wrong here?

The call returns a tuple, and the [0] element just indicates if the call 
succeeded or not - since it's succeeding, it returns True every time. The [1] 
element should be the result data, however that's returning 'None' at the 
moment, so the call still isn't working correctly.

I'm looking at it and will let you know.

Jim




More information about the PyQt mailing list