#!/usr/bin/env python # -*- coding: utf-8 -*- from tkinter import * def action(): print("Yes, we can !") # impression de la valeur du champ abcdef = champ.get() print(abcdef) root = Tk() w = Label(root, text="Bonjour!") w.grid(row=0) champ = Entry(root) champ.grid(row=1) b = Button(root,text="Click here !",command=action) b.grid(row=2) c = Button(root,text="Quit",command=root.quit) c.grid(row=3) root.mainloop() # Ă©liminer la fenĂȘtre : root.destroy()