Python GUI Programming with Tkinter: Design and build functional and user-friendly GUI applications, 2nd Edition ペーパーバック – 2021/10/28
Transform your evolving user requirements into feature-rich Tkinter applications
- 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
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
- 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
- Planning for the Expansion of Our Application
- Creating Menus with Menu and Tkinter Dialogs
- Navigating Records with Treeview and Notebook
- Improving the Look with Styles and Themes
- Maintaining Cross-Platform Compatibility
- Creating Automated Tests with unittest
- Improving Data Storage with SQL
- Connecting to the Cloud
- Asynchronous Programming with Thread and Queue
- Visualizing Data Using the Canvas Widget
- Packaging with setuptools and cxFreeze
- Appendix A : A Quick Primer on reStructuredText
- Appendix B: A Quick SQL Tutorial
- 出版社 : Packt Publishing; 2nd版 (2021/10/28)
- 発売日 : 2021/10/28
- 言語 : 英語
- ペーパーバック : 664ページ
- ISBN-10 : 1801815925
- ISBN-13 : 978-1801815925
- 寸法 : 19.05 x 3.81 x 23.5 cm
- Amazon 売れ筋ランキング: - 127,794位洋書 (の売れ筋ランキングを見る洋書)
Wer kein Problem hat mit englischer Fachliteratur und genügend Zeit mit bringt findet hier war er braucht. Wie auch immer, am Ende muss ich meinen Code selber schreiben um mein Verständnis sichern zu stellen. Ich hätte mir noch den einen oder anderen Hinweis mehr gewünscht was der Autor vermutlich als bekannt voraus gesetzt hat. Darunter der Zusammenhang zu der Anweisung mainloop() in Verbindung mit nachgelagertem Code. Die Lektüre bringt alles mit was erforderlich ist und von daher bin ich damit sehr zufrieden.
have learned the basic of Python, but haven't written much beyond
simple scripts" this book conveys a difficult progression for
beginners to follow.
Specifically, beginners attempting to follow the initial GUI demo
of Tkinter widgets starting on page 10 must follow an explanation
of many widgets to page 21 before anything can be displayed.
Ideally a beginner should receive feedback for each widget
discussed in this introduction to widgets. Please add the
necessary 'pack()' or 'grid()' calls following each widget. Then
add the 'root.mainloop()' to run the widgets so far.
This would allow beginners to verify each widget works explained.
Beginners would also be more inclined to play with the code and
thus cement their learnings.
The next widget would then be inserted before 'root.mainloop()'.
Variables do not follow pep 8 naming conventions. Using
'myentry' without the recommended underscore only adds friction
for a beginner to use variables: "Is that name 'myentry' or
'my_entry'?" Please use pep8 checkers on your code!
An unfortunate impact of tkinter not following pep8 should not
impact developers using proper pep8 suggestions. (Tkinter
existed before pep 8.)
Following the unnecessarily obscure Chapter 1 using Tkinter
widgets, Chapter 3 switches to Ttk widgets. The beginner has
received only the surface of Tkinter widgets and must now slog
through a similarly muddled tour of Ttk widgets.
Chapter 3 finally provides the first step in implementing the
data entry application. Yet once again readers are forced to
enter 13 pages of code and visually test without a UI to verify
Yes, the code for all this has been provided. Readers desiring to
understand the code will likely want to see results as soon as
possible. Entering the code manually and seeing immediate results
provides a great deal of learning.
This book places unit testing after many pages of coding.
Unfortunately, many other books relegate unit testing as an
A reader's code may display properly, but what side effects doom
the application to failure? Unit testing should follow each code
segment. Otherwise how can a beginner absolutely know the code
performs correctly? Code coverage seems to be omitted.
The use of mocks for Tkinter is to be commended. The special
handling with mocks, asynchronous code, and simulating user
actions provides useful information.