__author__ = 'nicolasperrier'

from tkinter import *
from time import sleep

class MonPremierTk:
    """

    """
    def __init__(self, racine):
        """

        :param racine:
        :return:
        """
        Label(racine, text="Hello, world!").pack()


        b = Button(racine, text="Afficher ma saisie", command=self.afficher)
        b.pack()

        self.e = Entry(racine)
        self.e.pack()

        self.t = Text(racine)
        self.t.pack()

    def afficher(self):
        self.t.insert(END,self.e.get())


if __name__=='__main__':
    racine = Tk()
    #approche par classe objet
    MonPremierTk(racine)
    racine.mainloop()