def button_press(self, widget, event):
    if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
        widget.popup(None, None, None, event.button, event.time)
Python Right Click Menu Using PyGTK