Tag Archives: Site News

Python GUI Programming with Tkinter –SECOND EDITION!

It’s official, friends — The second edition of my book, Python GUI Programming with Tkinter, is officially available for purchase on Amazon!

Python GUI Programming with Tkinter, Second Edition!

This new edition has been my primary focus since last February, and it’s a lot more than just a dust-off of the text and a new cover. Here’s a rundown of the improvements we’ve made since the first edition:

  • Obviously, we updated the code for Python 3.9 and the latest versions of other libraries (Postgres, Matplotlib, cx_Freeze, etc). Many things that had to be worked around in the first edition are fixed now, so all that’s been updated.
  • The learning curve is completely re-tooled. The first edition jumped straight into OOP usage, which I found caused a lot of beginners to struggle. This version starts out with more procedural Tkinter code for the first few chapters. There is an entire new chapter that specifically covers classes and OOP, and goes through various practical ways you can use classes with a Tkinter application.
  • There is a stronger emphasis and consistency in MVC design throughout the book.
  • The networking section now covers SFTP instead of FTP, for a more modern take on file transfers.
  • We cover more Tkinter widgets, and lots of new things the first edition didn’t cover.
  • Overall the text is fleshed out and more readable; the book is about 50% longer than the original edition!

It’s hard to put into words how much work went into this revision; I had a GREAT editing team this time around and technical feedback from author and coder Alejandro Rodas de Paz (author of Tkinter GUI Application Development Cookbook) who really kept me on my toes!

For my Youtube audience, I hope to get a video together soon to tell you all about it!

Tkinter book now available for pre-order

The cover of Python GUI programming with Tkinter by Alan D MooreExciting news!  My book is now available for pre-order from Packt Publications.    It won’t be out until June, but I’m 2/3 of the way through writing and pretty pleased with what I’ve got so far.

If you know a budding Python programmer who’s interested in writing desktop applications, this is going to be a great book for them; even if they don’t end up using Tkinter in the long run, they’ll learn a lot of good coding habits and application design techniques.

For example, I just finished up a chapter on unit testing that covers the Python unittest library in-depth and walks the reader through writing real tests on actual application code.  Beyond the basics, we deal with challenges like mocking out file access, testing mixin classes, and creating integration tests on our GUI elements.

If you have any questions about what is or isn’t in the book, or suggestions on topics I shouldn’t leave out, feel free to comment!

https://www.packtpub.com/application-development/python-gui-programming-tkinter

 

Big news: A book is on the way!

This blog has been a tad slow over the last year or so, mostly because I’ve been concentrating more on making music than writing code; but that all changed when I was contacted last month with an opportunity to write a book on Tkinter.  So, sometime early next summer, my first book, Python GUI Programming with Tkinter, will be available from Packt Publications.

Wait, Tkinter?  In 2018??

Yes, I know what you’re thinking; it’s either “What on earth is Tkinter?” or “Why would you do a book on it in 2018?”

For those asking the first question, Tkinter is a GUI programming library built into the Python standard library; and if that doesn’t mean anything to you, you might not be the target demographic for this book. 🙂

For those asking the second question — well, hear me out.

To start with, this book isn’t just going to be a dry Tkinter how-to; it’s fundamentally a book about writing end-user applications and choosing the right technology to solve real-world problems (particularly in the workplace).  I’ll be going through the process of dissecting a business need and building an appropriate software solution.

The simplicity and ready availability of Tkinter makes it a decent choice for teaching budding Python programmers these principles.

But as for Tkinter itself, I think it gets a bum rap from the Python community.  Sure, it’s not a glamorous, trendy library.  It doesn’t have declarative syntax, a million and one widgets for every occasion, a Javascriptesque mini-language for form automation, or a 100 Mb browser exectuable bundled into it.  But Tkinter hardly deserves the pariah status some Python coders give it.

The three things I mainly hear about Tkinter are:

It’s ugly

Not so many years ago, Tkinter was hideous.  Aliased fonts, limited theming, and widgets that escaped from a 1990s Unix desktop made for a look that screamed LEGACY and indelibly marked Tkinter as deprecated in the minds of many Python coders.  This has changed though; fonts are now anti-aliased, and the TTK widget set provides themable, platform-appropriate widgets.  Tkinter may not give you the Material Design look or animated semitranslucent widgets, but for your standard utility, control panel, or data-drive application, it looks fine.

The widgets are too simple

Tkinter’s form widgets are a tad disappointing when you first use them.  Comboboxes and Spinboxes don’t behave like their counterparts in other toolkits.  In the book I’m going to turn this weakness into a strength, by showing you how to extend and customize these widgets to behave precisely the way our users need them to behave.

It doesn’t scale well to larger applications

I’ve read (and maybe even said?) many times that Tkinter is “fine for small apps, but doesn’t scale to big things”.  That may be true depending on your definition of “small” and “big”, but most of us aren’t building Microsoft Office.  The book is going to go through creating a moderately-sized database application that would be pretty typical of in-house software and I’ll be demonstrating techniques to make Tkinter scale.

Exciting times, folks

This is my first experience as an author, so I’m hoping it goes well.  If you have particular aspects of Tkinter you’d like to see covered, let me know!

Spam-a-lam-a-ding-dong

Just a short note to let any potential commenters know that this blog is being rocked by spammers right now. None of it is getting through, thanks to my moderation settings and a few anti-spam plugins; but it’s possible your comments might be getting lost.

I value all (actual made-by-humans-who-are-reading-the-articles) comments to this blog, positive or negative, so deepest apologies if yours gets lost. Just make sure you post something meaningful and easily recognizable as not spam. Thanks!

Comments fixed

Apparently due to my failure to read directions, comments have been broken on this site for a looooooooooooooooong time.  So now they are fixed, I expect everyone to bless me with their profound wisdom.