@@ -0,0 +1,1631 @@
+'''%0D%0ACreated on Aug 12, 2017%0D%0A%0D%0A@author: Aditya%0D%0A'''%0D%0Aimport tkinter as tk%0D%0Afrom tkinter import ttk%0D%0A%0D%0Adef sayhello():%0D%0A    root = tk.Tk()      # call Tk constructor method to create new top level widget (main window)%0D%0A    %0D%0A    # Below statement creates a label with text as a %0D%0A    # child of root window and use pack geometry management method to put text on window%0D%0A    tk.Label(root, text = 'Hello Python GUI').pack()%0D%0A    %0D%0A    # ttk = themed tk widgets%0D%0A    # create button using 'themed tk widgets' (ttk)%0D%0A    # parent widget of button-widget is defined as 'root' variable%0D%0A    # text displayed on button defined as text = 'Click Me'%0D%0A    button = ttk.Button(root, text = 'Click ME')%0D%0A    button.pack()                                       # pack the button%0D%0A    %0D%0A    %0D%0A    # find value of property from widget object%0D%0A    prop_text = button%5B'text'%5D%0D%0A    print('Value of %5C'%7B%7D%5C' property in button_obj is %7B%7D'.format('text', prop_text))%0D%0A     %0D%0A    # change value on button : (Note values stored as dictionary in object)%0D%0A    button%5B'text'%5D = 'Press ME'%0D%0A     %0D%0A    # use config command%0D%0A    button.config(text = 'Push ME')%0D%0A     %0D%0A    # To print the value of all propertise of widget object%0D%0A    print(button.config())%0D%0A     %0D%0A    # underlying TK name of the widget:%0D%0A    # tkinter generates random number as a unique identifier (name) for each widget created%0D%0A    print(str(button))%0D%0A    print(str(root))    # 'rood window is identified as a '.' by tkinter (underlying name)%0D%0A    %0D%0A    %0D%0A    root.mainloop()         # run mainloop method for run window%0D%0A    %0D%0Adef test():%0D%0A    sayhello()%0D%0Aif __name__ == '__main__':test()

Make root window