''' lecture03_display_1_basic.py Demo of Tkinter module GUI features Oliver W. Layton CS251: Data Analysis and Visualization Best site for Tkinter help: http://effbot.org/tkinterbook/ ''' # import tk class DisplayApp: '''Create a class to build and manage the display''' def __init__(self, width, height): # create a tk object, which is the root window # width and height of the window # set up the geometry for the window. The +values are X and Y offsets. # Note: Y is positive going downward # set the title of the window # set the maximum size of the window for resizing # bring the window to the front (vs. lower()) # - do idle events here to reliably get actual canvas size # now we can ask the size of the canvas pass def main(self): print('Entering main loop') # Run main loop to listen for events self.root.mainloop() if __name__ == "__main__": dapp = DisplayApp(1200, 675) dapp.main()