Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recentely started to program in Python and making a script/plugin for Pidgin,i need to access PurpleConversationUiOps and use the has_focus field,based in some examples in documentation of Pidgin i made this:

    #!/usr/bin/env python
    import dbus, gobject
    from dbus.mainloop.glib import DBusGMainLoop

    def view(conv):
     if conv == 1: #if has focus
       print "Has Focus"

    bus = dbus.SessionBus()
    loop = gobject.MainLoop()

He gives no error but I don't receive any signal,so how can i access the has_focus field?

share|improve this question
You might consider asking this over at StackOverflow. – Ken Kinder Jan 28 '13 at 15:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.