DILi DILi - 9 months ago 52
Python Question

How to create a pop window using pygtk?

I have created a simple program. Now I am trying to give it a GUI. Since I have coded in python, I am using pygtk. I have made a main window and now I want to add a pop up window, which will become active when the Open button is pressed in the main window.
I have no previous experience with pygtk.

import gtk

d = gtk.Dialog()
d.add_buttons(gtk.STOCK_YES, 1, gtk.STOCK_NO, 2)

label = gtk.Label('Do you like GTK?')

answer = d.run()

print answer

gtk dialog example