John E. Grayson's deeply thought out, maturely written Python and Tkinter Programming does the double service of being a excellent object-oriented GUI book and communicating the standard for Tk-widget-based GUI development to the Python community. The short-term result will be a rapid expansion in the popularity of Python itself; the long-term result will be a new batch of supportable, reusable code.
Grayson begins with a three-line "hello world" variant that works out of the box. He moves quickly to a variety of GUI calculators to exhibit buttons and label widgets. Familiarity with Tk from Tcl/Tk or Perl/Tk is helpful but not essential. The convenient bonus of the Python implementation is its inclusion in the standard Python release, of which the current stable version is 1.5.
Nearly half of the book is dedicated to Tk widget implementations and constitutes a translation of Tk into Python. By itself, it is a good teaching tool for students of Python who already know Tk in one of its other manifestations. Appendices covering build/install issues Python megawidgets and a Tkinter reference manual comprise nearly 40 percent of the book, leaving a brief 15 percent for the introductory tutorial, application building, and performance tuning. A late chapter on threads suggests a broad range of client/server applications, but is too brief to be more than a tease. Throughout the text, code snippets are presented in coherent blocks with annotations sensibly appearing as clearly numbered end notes to those blocks.
Grayson presents cross-platform issues with maturity and candor. While Python for Windows and Macintosh environments is stable, he asserts, the Tkinter module does not have the same global look-and-feel control. Fonts and colors are dictated partially by the platform OS.
The subtle challenge for developers is to develop supportable code in the breakneck boss-pleasing, GUI-driven environment. Grayson's elegant introduction to Tkinter advances the subtext of supportability noticeably farther along. By documenting Tkinter, he will push a group of laggard hackers to learn object-oriented principles. And that may be his lasting contribution. --Peter Leopold
Product Details
Would you like to give feedback on images?
|
Consider to buy this book because:
- It is an exhaustive guide to Python and TKinter programming. No "shadow zones" left.
- It contains 14Mb of working and well written code (available online). You can play and learn from it.
- It is well-organized, carefully edited and clearly written. No struggles to get the info you need.
- It is a first-hand report from the world of real professional programming. No kid tales.
- You get a real understanding of Python and TKinter programming from this book, not a simple, dry description of this language.
The best characteristic of this book is its clear and flexible structure: you are not forced to follow the "flow-of-consciousness" of the author, chapter after chapter (Have you ever read "Programming Python", by Mark Lutz? ). You can easily spot and read the part that most interest you. All of the chapters focus on well-defined aspects of the Python/TKinter programming and are quite indipendent from the other ones. Grayson's writing is always clear and well-organized. You do not have to struggle for extracting the information you need. This is a book designed with a demanding and busy reader in mind.
I hope to see more from Grayson and Manning in the future.
The basics of Tk are poorly presented, apparently on the assumption that the reader is already familiar with Tk. The first appendix is devoted to the mapping between Tk and Tkinter, a typical "nugget" being the revelation that the Tk construct "-label string" maps onto the Tkinter construct "label=string", which conveys no useful information in the absence of a complete Tk reference.
Appendix B, a Tkinter reference, has often left me frustrated. It begins with the understandable space-saving device of a list of "Options shared by most widgets," but then continues with "Options shared by many widgets" (why separate?) and "Common widget methods," whose connection with the rest of the appendix is obscure. Studying a widget's entry in Appendix B seldom produces a confident grasp of how to use that widget.
The book is mostly tutorial in form, suited for leisurely reading but frustrating as a reference.
First, I felt that this was a pretty good book as far as the instruction of Tkinter goes. It assumes you have at least a basic understanding of Python, so you may want to learn the language before diving into it. There are three aspects of the book that I think deserve special attention: the examples, special topics covered, an how the book is broken up.
It has no shortage of examples for each of the various widgets, and provides well commented code. The one complaint I have here is that the descriptive comments are all at the end of the code, so I frequently found myself flipping back and forth between the code and the comments.
It also priovides several examples of common situations you may run across: dynamically changing widgets, "smart" widgets, and issues regarding GUI overhead.
The first part of the book concentrates on looking under the hood of Tkinter and learning how to interact with its components and get applications running. The second part of the book spends is more of a textbook on the design of more effective/attractive interfaces.
Secondly, the book is also an above-average reference manual. It has two colored sections that outline all of the widgets in standard Tkinter and Pmw (Python Mega-widgets). I find this especially usefull because once you learn the basics of the Tkinter system, you really only need a manual that reminds you of how to get the right widget you want. I think in the course of using the reference manual I've only found two errors, which is pretty good for around 175 pages of material.
Tags Customers Associate with This Product(What's this?)Click on a tag to find related items, discussions, and people.
|