Book description
Transform your evolving user requirements into feature-rich Tkinter applications
Key Features
- Extensively revised with new content on RESTful networking, classes in Tkinter, and the Notebook widget
- Take advantage of Tkinter's lightweight, portable, and easy-to-use features
- Build better-organized code and learn to manage an evolving codebase
Book Description
Tkinter is widely used to build GUIs in Python due to its simplicity. In this book, you'll discover Tkinter's strengths and overcome its challenges as you learn to develop fully featured GUI applications.
Python GUI Programming with Tkinter, Second Edition, will not only provide you with a working knowledge of the Tkinter GUI library, but also a valuable set of skills that will enable you to plan, implement, and maintain larger applications. You'll build a full-blown data entry application from scratch, learning how to grow and improve your code in response to continually changing user and business needs.
You'll develop a practical understanding of tools and techniques used to manage this evolving codebase and go beyond the default Tkinter widget capabilities. You'll implement version control and unit testing, separation of concerns through the MVC design pattern, and object-oriented programming to organize your code more cleanly.
You'll also gain experience with technologies often used in workplace applications, such as SQL databases, network services, and data visualization libraries. Finally, you'll package your application for wider distribution and tackle the challenge of maintaining cross-platform compatibility.
What you will learn
- Produce well-organized, functional, and responsive GUI applications
- Extend the functionality of existing widgets using classes and OOP
- Plan wisely for the expansion of your app using MVC and version control
- Make sure your app works as intended through widget validation and unit testing
- Use tools and processes to analyze and respond to user requests
- Become familiar with technologies used in workplace applications, including SQL, HTTP, Matplotlib, threading, and CSV
- Use PostgreSQL authentication to ensure data security for your application
Who this book is for
This book is for programmers who understand the syntax of Python, but do not yet have the skills, techniques, and knowledge to design and implement a complete software application. A fair grasp of basic Python syntax is required.
Table of contents
- Preface
- Introduction to Tkinter
- Designing GUI Applications
- Creating Basic Forms with Tkinter and Ttk Widgets
- Organizing Our Code with Classes
-
Reducing User Error with Validation and Automation
- Validating user input
- Creating validated widget classes
- Implementing validated widgets in our GUI
- Automating input
- Summary
- Planning for the Expansion of Our Application
- Creating Menus with Menu and Tkinter Dialogs
-
Navigating Records with Treeview and Notebook
- Implementing read and update in the model
- The Ttk Treeview
- Implementing a record list with Treeview
- Adding the record list to the application
- Summary
- Improving the Look with Styles and Themes
-
Maintaining Cross-Platform Compatibility
- Writing cross-platform Python
- Writing cross-platform Tkinter
- Improving our application's cross-platform compatibility
- Summary
- Creating Automated Tests with unittest
-
Improving Data Storage with SQL
- PostgreSQL
- Modeling relational data
- Creating the ABQ database
- Connecting to PostgreSQL with psycopg2
- Integrating SQL into our application
- Summary
- Connecting to the Cloud
-
Asynchronous Programming with Thread and Queue
- Tkinter's event queue
- Running code in the background with threads
- Using locks to protect shared resources
- Summary
- Visualizing Data Using the Canvas Widget
- Packaging with setuptools and cxFreeze
- Appendices
- A: A Quick Primer on reStructuredText
- B: A Quick SQL Tutorial
- Other Books You May Enjoy
- Index
Product information
- Title: Python GUI Programming with Tkinter - Second Edition
- Author(s):
- Release date: October 2021
- Publisher(s): Packt Publishing
- ISBN: 9781801815925
You might also like
book
Python GUI Programming with Tkinter
Find out how to create visually stunning and feature-rich applications by empowering Python's built-in Tkinter GUI …
video
The Art of Doing: Create 10 Python GUIs with Tkinter Today!
Have you learned the fundamentals of Python and then asked yourself “What next?”. If so, consider …
book
Python Object-Oriented Programming - Fourth Edition
A comprehensive guide to exploring modern Python through data structures, design patterns, and effective object-oriented techniques …
book
Expert Python Programming - Fourth Edition
Gain a deep understanding of building, maintaining, packaging, and shipping robust Python applications Key Features Discover …