DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
GrabFocus For Xfce4 Verve Applets In Python Using Dbus.
// This little code allow to grab focus of the Verve applet(command line interface with auto-completion and command history) using python and dbus system.
#!/usr/bin/env python
import dbus
try:
bus = dbus.SessionBus()
except:
print 'errore nella sessione dbus'
try:
obj = bus.get_object("org.xfce.RunDialog", "/org/xfce/RunDialog")
verve = dbus.Interface(obj, "org.xfce.Verve")
except:
print 'errore....'
verve.GrabFocus()





