File: helloworld.py

package info (click to toggle)
gazpacho 0.6.6-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,116 kB
  • ctags: 2,058
  • sloc: python: 12,455; xml: 239; makefile: 9; sh: 6
file content (23 lines) | stat: -rw-r--r-- 497 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pygtk
pygtk.require('2.0')
import gtk

from sys import argv

from gazpacho.loader.loader import ObjectBuilder

def on_button1__clicked(button):
    print 'you clicked the button!'
    
def on_window1__destroy(window):
    gtk.main_quit()
    
if __name__ == '__main__':
    wt = ObjectBuilder('helloworld.glade')
    wt.signal_autoconnect(globals())
    if '--benchmark' in argv:
        while gtk.events_pending():
            gtk.main_iteration_do()
    else:
        gtk.main()