[PyKDE] idle time detection

Andreas Pakulat apaku at gmx.de
Thu Nov 9 21:02:10 GMT 2006

On 09.11.06 21:50:51, Torsten Marek wrote:
> Hash: SHA1
> Matt Newell schrieb:
> > On Thursday 09 November 2006 11:48, Andreas Pakulat wrote:
> >> On 09.11.06 19:51:11, Sebastian Kügler wrote:
> >>> Can anyone think of some clean way for a PyKDE application to detect idle
> >>> time?
> >>>
> >>> For the Kubuntu powermanager applet, we're currently missing that
> >>> feature. The usecase would be kicking in a suspend / hibernate / dimming
> >>> display after N seconds of no mouse or keyboard activity.
> >> You have to hook into X11 then, I think.
> > 
> > You need to use the XScreenSaver extension.  Attached is a c++ class used by 
> > older psi that i use in one of my projects.  I'm not sure but you can 
> > probably achieve the same thing with pure python.
> just a heads up,  you might want to look at ctypes if you do stuff like that, no
> need to write a C extension yourself. Remember, ctypes is stdlib in 2.5.

Well, I can see a X11 interface module here on my Debian machine:
python-xlib, so I guess the same is true for kubuntu. Which means
Sebastian could rewrite this small class in plain Python.


You'll never see all the places, or read all the books, but fortunately,
they're not all recommended.

More information about the PyQt mailing list