Organizing Our Code with Classes
Things are going great with your data entry form! Your boss and coworkers and excited to see the progress you've made and are already coming up with some ideas of what other features could be added. This makes you a little nervous, to be honest! While they see a professional-looking form, you know that the code underneath is getting bulky and repetitive. You've got some warts in there too, like a global variable and a very cluttered global namespace. Before you start adding more features, you'd like to get a handle on this code and start breaking it down into some manageable chunks. For this, you'll need to create classes.
In this chapter, we'll cover the following topics:
- In A primer on Python classes, we'll review how to create Python classes and subclasses.
- In Using classes with Tkinter, we'll discover ways to utilize classes effectively in Tkinter code.
- In Rewriting our application using...