Dec
24
How to use your self
There are a lot of questions on StackOverflow asking "what's the deal with self?"
Many of them are asking a language-design question: Why does Python require explicit self when other languages like C++ and friends (including Java), JavaScript, etc.
Tkinter validation
Tkinter makes slapping together a simple GUI very easy. But unfortunately, many of its features aren't very well documented.
7What's the deal with ttk.Frame.__init__(self, parent)
In Python 2.x Tkinter code, you see a lot of stuff like this:
class MyFrame(Frame): def __init__(self, parent, n): Frame.__init__(self, parent) self.n = n Why?
Inheritance and overriding
Some people start on Tkinter before getting far enough into learning Python.