Right Click Menu (context menu) using PyGTK

Viewed 7906

So I'm still fairly new to Python, and have been learning for a couple months, but one thing I'm trying to figure out is say you have a basic window...

#!/usr/bin/env python

import sys, os
import pygtk, gtk, gobject

class app:

   def __init__(self):
    window = gtk.Window(gtk.WINDOW_TOPLEVEL)
    window.set_title("TestApp")
    window.set_default_size(320, 240)
    window.connect("destroy", gtk.main_quit)
    window.show_all()

app()
gtk.main()

I wanna right click inside this window, and have a menu pop up like alert, copy, exit, whatever I feel like putting down.

How would I accomplish that?

1 Answers
Related