Question window - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Question window (/thread-2799.html) |
Question window - John_paul - Apr-11-2017 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 ? # -*- 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") RE: Question window - Larz60+ - Apr-11-2017 It works fine on my system It does create a small window How exactly did you run it? python version os |