I tested the code in this answer and it works just fine.
The code creates a Application
class like this:
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
and creates an instance with:
root = Tk()
app = Application(master=root)
However, there is one thing I do not understand in it: why the constructor takes as an argument a None object def __init__(self, master=None):
but he calls the Application()
class he passes it a root=Tk()
instance ?