File: helloworld.py

package info (click to toggle)
gazpacho 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,452 kB
  • ctags: 2,508
  • sloc: python: 16,319; xml: 243; makefile: 10; sh: 6
file content (23 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (2)
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()