Tkinter GUI Application Development Blueprints
Second Edition
Build nine projects by working with widgets, geometry management, event handling, and more
Bhaskar Chaudhary
BIRMINGHAM - MUMBAI
Tkinter GUI Application Development BlueprintsSecond Edition
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editors: Aaron Lazar
Acquisition Editor: Denim Pinto
Content Development Editors: Lawrence Veigas
Technical Editor: Adhithya Haridas
Copy Editor: Safis Editing
Project Coordinator: Prajakta Naik
Proofreader: Safis Editing
Indexers: Pratik Shirodkar
Graphics: Jisha Chirayil
Production Coordinator: Deepika Naik
First published: November 2015
Second edition: March 2018
Production reference: 1160318
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78883-746-0
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
- Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
- Improve your learning with Skill Plans built especially for you
- Get a free eBook or video every month
- Mapt is fully searchable
- Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Bhaskar Chaudhary is a professional programmer and information architect.
He has a decade of experience in consulting, contracting, and educating in the field of software development. He has worked with a large set of programming languages on various platforms over the years.
He is an electronics hobbyist and a musician in his free time.
I would like to thank my parents for everything that I am. Thanks to my wife Sangita, son Chaitanya, sisters Priyanki and Shambhavi, niece Akanksha, nephew Praneet, and friend Souvik for being around. Anurag, you are always remembered.
About the reviewer
Erik S. Rapert is a pale, slim programmer and a twin who loves Linux and video
games. He lives in Dallas with his wife, who is also a software engineer. Erik has a
wide range of experience, which includes creating blinking LEDs using Arduino,
building small desktop apps using Python and Tkinter, web development with PHP or
Ruby, and developing cutting-edge virtual reality using C++. He has used a very
broad range of programming languages, but Python is one of his favorites.
Thank you William C. Slater for teaching me how to write software. Thank you
Andrew Closson for being a teacher. Thank you Ashley N. Tharp for being you.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
Tkinter GUI Application Development Blueprints, Second Edition will walk you through the process of developing real-world graphical applications using Python and Tkinter, the built-in GUI module of Python.
This book attempts to highlight the features and capabilities of Tkinter while demonstrating best practices involved in writing GUI programs, irrespective of the library that you choose to build your application with. Here, you will learn how to use Tkinter to develop exciting, fun, and useful GUI applications with Tkinter and Python.
We hope to take you on a fun journey through more than 10 projects from different problem domains. As we develop new applications in each project, the book also builds up a catalog of some commonly used strategies to develop real-world applications.
Who this book is for
Software developers, scientists, researchers, engineers, students, and programming hobbyists with basic familiarity with Python will find this book interesting and informative. A motivated Python newbie with a background in writing programs can fill in the gaps of knowledge with a little outside research.
People familiar with basic programming constructs in other programming languages can also catch up with some brief reading on Python. No GUI programming experience is assumed.
What this book covers
, Meet Tkinter, begins from scratch, providing an overview of Tkinter and covering details of how to create root windows, add widgets to a root window, handle layout with geometry managers, and work with events.
, Making a Text Editor, develops a text editor using the procedural style of programming. It gives readers their first taste of several features of Tkinter and what it is like to develop a real application.
, Programmable Drum Machine, uses object-oriented programming to develop a drum machine that is capable of playing user-composed rhythms. The application can also save compositions and later edit or replay them. Here, you will learn the techniques of designing a GUI application using a model-first philosophy and writing multithreaded GUI applications.
Next page