How to do it...

In the beginning, all hell breaks loose, but we will soon fix this apparent mess.

Note that in Eclipse, the PyDev editor hints at coding problems by highlighting them in red on the right-hand side portion of the code editor.

Maybe we should not code in OOP after all, but this is what we do, and for very good reasons:

We just have to prepend all the variables with the self keyword and also bind the functions to the class by using self, which officially and technically turns the functions into methods.

There is a difference between functions and methods. Python makes this very clear. Methods are bound to a class while functions ...

Get Python GUI Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.