#-*- coding:utf8 -*-
from Tkinter import *
class Interface(Frame):
def __init__(self):
Frame.__init__(self)
self.pack()
self.choixPolice = StringVar()
Texte = ['oui','non']
for k in range(2):
self._can = Radiobutton(self, variable = self.choixPolice,
command = self.changePolice,
value = Texte[k])
self._can.pack(side = LEFT, padx = 5)
def changePolice(self):
print self.choixPolice.get()
if __name__ == "__main__":
Interface().mainloop()