# -*- coding:Latin-1 -*- from Tkinter import * class Fenprinc(Tk): '''Fenêtre principale de l'application''' def __init__(self): Tk.__init__(self) self.vchk1 = IntVar() self.vchk1.set(1) self.chk1 = Checkbutton(self, text="Bouton1", variable=self.vchk1, command=self.test) self.chk1.pack() self.but = Button(self, text="nouvelle", command=self.nouvelle) self.but.pack() self.chk1.select() def test(self): print "IntVar" print self.vchk1.get() def nouvelle(self): Fenprinc() if __name__ == "__main__": Fenprinc().mainloop()