Apr-11-2017, 11:11 AM
Hello, i have python 3.4.3, is it normal when i run this module, nothing happens ?
It is not supposed to create a window ?
It is not supposed to create a window ?
# -*- coding: utf-8 -*- import tkinter class View : def __init__(self,texte="Hello"): fenetre = tkinter.Tk() fenetre.title("First exemple") lbl_message = tkinter.Label(fenetre, text=texte, fg="red") lbl_message.pack() btn_quitter = tkinter.Button(fenetre, text="Goodbye", command = fenetre.destroy) btn_quitter.pack() fenetre.mainloop() if __name__ == '__main__' : mon_appli = View("I hope you have a good holiday")