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 ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# -*- 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" ) |