O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a tiny framework

So why do we need another framework on top of Tkinter? If we need to build just a single program, we need not build a framework. However, if we find ourselves writing the same boilerplate code over and over again, a framework is what we need. That is, a framework is a tool that lets us easily generate generic and often-used patterns with ease.

Consider, for example, menus used in programs. A menu is such a common element in most programs, yet we need to handcraft each menu item every time we sit down to write a program. What if we could further abstract to simplify menu generation?

This is where frameworks come in handy.

Say you have a program that has 10 different top-level menus. Say each of the top-level menus ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required