Saturday, May 14, 2011

My first class that makes a GUI

#I wrote a class that can be used to create a GUI. It is a start.

from Tkinter import *


class aGUI:

    def __init__(self):
            def hello():
                print('Hello')


            root=Tk()
            btn=Button(root,text='press this', command=hello)
            btn.pack()
            root.mainloop()
           

No comments:

Post a Comment

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.