import os from tkinter.filedialog import askopenfilename from tkinter import * from tkinter.filedialog import asksaveasfile, askopenfile #import check4 class Application(Frame): def __init__(self): Frame.__init__(self) # constructeur de la classe parente self.master.title("comparaison mgw") frSup =Frame(self) print( 'init') def mgw (): result=[] #m=IntVar() #definir les mgw concernées print('je lance check6') import check6 print('fin d import') m=check6.Bouton()# instanciation de la classe print('m dans mgw=',m) print('type de m dans mgw=',type(m)) result=m.allume() print('fin allume',m) #result=m.state() print('result=',result) #m.allstates() print ('m=',m) print('classe de m=',type(m)) #o=check6.state()#on recupere la list des mgw #print('list state o=',o) print('fin de check6, m=',m) print('mgw') m.mainloop def filtre (): #definir les filtre sur les parametres concernées print('filtre') def reference (): #definir la mgw de reference print('reference') if __name__ == '__main__': m=[] root=Tk() listmgw=[] app=Application() but=Button(root, text ="Def reference", command =reference) but.pack(side =LEFT) Button(root, text ="Ajout suppression MGW", command =mgw).pack(side =LEFT) print('pff') Button(root, text ="Filtre", command =filtre).pack(side =LEFT) Button(root, text ="quiter", command =root.destroy).pack(side =LEFT) app.mainloop()