Free Sample
+ Collection

Tkinter GUI Application Development HOTSHOT

Bhaskar Chaudhary

Tkinter is a great place to start with GUI Application development and this book is designed to make the process fun and informative. With bags of real examples, like a drum machine and chess game, it will get you coding in no time.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849697941
Paperback362 pages

About This Book

  • Develop 10 real GUI applications using procedural and object-oriented styles
  • Write network programs, database-driven programs, multi-threaded programs and more with Tkinter
  • A practical guide to discover the best practices involved in writing GUI applications

Who This Book Is For

If you have just started with GUI programming, this book is ideal for you. This book is also great if you are an experienced software developer, scientist, researcher, engineer, student, or hobbyist.

Table of Contents

Chapter 1: Meet Tkinter
Mission Briefing
The root window – your drawing board
Widgets – building blocks for your GUI program
Getting to know core Tkinter widgets
Geometry management
Events and callbacks – adding life to programs
Doing it in style
Mission Accomplished
A Hotshot Challenge
Chapter 2: Making a Text Editor like Notepad
Mission Briefing
Setting up the widgets
Leveraging the power of built-in Text widget options
Indexing and tagging
Working with forms and dialogs
Working with message boxes
The icon toolbar and View menu functions
Event handling and the context menu
Mission Accomplished
A Hotshot Challenge
Chapter 3: Programmable Drum Machine
Mission Briefing
Setting up the GUI in OOP
Completing the pattern editor
Loading drum samples
Playing the drum machine
Tkinter and threading
More beat patterns
Object persistence
ttk-themed widgets
Mission Accomplished
A Hotshot Challenge
Chapter 4: Game of Chess
Mission Briefing
Structuring our program
Structuring chessboard-and-pieces-related data
Adding pieces on the board
Enforcing rules for pieces' movement
The chessboard logic
Making the chess functional
Adding menu and an info frame
Mission Accomplished
A Hotshot Challenge
Chapter 5: Audio Player
Mission Briefing
Getting the audio to play
Adding a playlist
Adding more controls to the player
Adding the top display console
Looping over tracks
Adding the contextual menu
Adding a tooltip and finalizing our player
Mission Accomplished
A Hotshot Challenge
Chapter 6: Drawing an Application
Mission Briefing
Developing a bare bone GUI framework
Structuring our drawing program
Handling mouse events
Drawing items on the canvas
Setting the options toolbar at the top
Adding some more features
Mission Accomplished
A Hotshot Challenge
Chapter 7: Some Fun Project Ideas
Mission Briefing
Building a screen saver
Building a Snake game
Creating a Weather Reporter
Creating a phonebook application
Graphing with Tkinter
Mission Accomplished
A Hotshot Challenge

What You Will Learn

  • Structure your programs in the model-view framework
  • Persist your application data with object serialization
  • Work with external libraries and Tkinter extensions
  • Write multi-threaded GUI programs
  • Re-factor code at every stage of application development
  • Integrate your GUI applications to backend database
  • Use networking with your Tkinter program
  • Apply Internationalization to your GUI applications
  • Develop a GUI program framework for maximum code reuse and rapid application development

In Detail

Tkinter is the built-in GUI package that comes with standard python distributions. This means it is easy to get started right away, without any extra installation or configuration. Tkinter’s strength lies in its simplicity of use and its intuitive nature which makes it suited for programmers and non-programmers alike. Once you get started, you will be surprised to see how a few lines of code can produce powerful GUI applications.

Tkinter GUI Application Development Hotshot helps you learn the art of GUI programming—building real-world, productive and fun applications like text editor, drum machine, game of chess, media player, drawing application and many more. Each subsequent project builds on the skills acquired in the previous project. Also, learn to write multi-threaded and multi layered applications using Tkinter. Get to know modern best practices involved in writing GUI programs. Tkinter GUI Application Development Hotshot comes with a rich source of sample codes that you can use in your own projects in any discipline of your choice.

Starting with a high level overview of Tkinter that covers the most important concepts involved in writing a GUI application, the book then takes you through a series of real world projects of increasing complexity, developing one project per chapter. After you have developed five full projects, the book provides you with some bare-bone skeleton codes for a few functional but incomplete projects, challenging you to put your skills to test by completing them.

Finally, you are provided with tips for writing reusable, scalable, and quality GUI code for larger projects. The appendices provide a quick reference sheet for Tkinter.


Read More