Why doesn't it work?


#1

Good evening,
My code should display a face which open the mouth when you click on “open”. The face appears the buttons doesn’t and I don’t understand why. I’ve try and try again for 6hours to debug the programme but I have’t successed.
I wrote the code using python 3, classes and Tkinter.

from tkinter import *

class Application(Frame):
    def __init__(self):
        Frame.__init__(self)        
        self.can = Visage(self)
        self.can.configure(bd =2, relief =SOLID)
        self.can.pack(side =TOP)
        Button(self, text ="ouvrir", command =self.can.■■■■■■■■■■■■(side = LEFT, padx =5, pady=5)
        Button(self, text ="fermer", command =self.can.ouvrir).pack(side = RIGHT, padx =5, pady=5)
        self.mainloop()

class Visage(Canvas):
    def __init__(self, boss =None):
        Canvas.__init__(self)
        self.configure(height =400, width =400)
        self.cc = [[200, 200, 195],
                   [275, 100, 25],
                   [125, 100, 25]]
                   
        i = 0
        while i < len(self.cc):
            el = self.cc[i]
            self.cercle(el[0], el[1], el[2])
            i += 1

        self.bouche = self.cercle(200, 300, 50)
        
                
    
    def cercle(self, x, y, r):
        self.create_oval(x-r, y-r, x+r, y+r)

    def ouvrir(self):
        self.bouche = self.cercle(200, 300, 50)

    def fermer(self):
        self.delete(self.bouche)
        self.bouche = self.create_line(150, 300, 250,300)

if __name__ == '__main__':
    app = Application()

Help me!
Thanks!!