When building your GUI application, you should create a folder on your desktop that will hold your .py file along with any other files that will be contained within the GUI. Then make sure your working directory is pointing to this folder as you develop/execute your GUI.
Your code should use the following format:
Imports
Functions
Code to run the application
The Project
As a GUI programmer, you will generally be responsible for deciding three
aspects of your program:
1. What components should appear on the screen? This involves
choosing the components that make the user interface. Typical components
include things like buttons, entry fields, check boxes, radio buttons, and scroll
bars. In Tkinter the components that you add to your GUI are called widgets.
The Radiobutton Widget (Sample Code)
The Scrollbar Widget (Scrollbar to Textbox) (Scrollbar to Frame)
2. Where should the components go and how styled? This involves deciding the positioning or placement of each component in the overall design structure. In Tkinter, this is referred to as geometry management.
3. How do components interact and behave? This involves adding
functionality to each component. For example, a button when clicked on, does
something in response; a scrollbar handles scrolling; and check boxes and radio
buttons enable the user to make some choices. In Tkinter, the functionality of
various widgets is managed by command binding or event binding using
callback functions.
4. Miscellaneous: Here are some extra references for your GUI development.
Multiple Windows (if your GUI will have multiple pages)
Multiple Pages (alternative to above)
Adding Pictures (any image file)
Adding Sounds (.wav or .mp3)
Open URL (to open a website in the default browser)
API/JSON (connecting to an API [data] website and unpacking
JSON files)