ページ

2011年1月23日日曜日

GladeとEclipse PyDevで Hello pythonしてみた

GladeとEclipse PyDevで Hello Pythonしてみた



Eclipse - The Eclipse Foundation open source community website.
http://www.eclipse.org/

Pydev
http://pydev.org/

Glade - A User Interface Designer
http://glade.gnome.org/



src
import gtk
import gtk.glade

builder = gtk.Builder() ## goto grade & save file
builder.add_from_file("helloworld.glade")
window = builder.get_object("window1")

def main():
    signals = {"on_window1_destroy": on_window1_destroy , "on_btn_clicked" :  on_btn_clicked}
    builder.connect_signals(signals)
    window.show()
    gtk.main()

def on_window1_destroy(self):
    gtk.main_quit()
 
def on_btn_clicked(self):
    gtk.main_quit()

if __name__ == "__main__":
    main()
















0 件のコメント:

コメントを投稿