Hi !
I have this code :
#!/usr/bin/env python
import sys
try:
import pygtk
pygtk.require("2.0")
except:
pass
try:
import gtk
import gtk.glade
except:
sys.exit(1)
class HellowWorldGTK:
"""This is an Hello World GTK application"""
def __init__(self):
#Set the Glade file
self.gladefile = "pygmail.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
self.window = self.wTree.get_widget("Hello")
if (self.window):
self.window.connect("destroy", gtk.gtk_main_quit)
def destroy(self, widget, data=None):
gtk.main_quit()
if __name__ == "__main__":
hwg = HellowWorldGTK()
gtk.main()
The "Close window" ( X button right minimaze and maximaze ) if i preset the
windows close
but the python instance not stop . I must give Ctr +C to stop the script and
rezult is :
./pygmail.py
Traceback (most recent call last):
File "./pygmail.py", line 33, in <module>
gtk.main()
KeyboardInterrupt
Thank you !
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/