arkkimede
arkkimede

Reputation: 105

Tkinter Gui does not appear

I'm trying to learning Python following a video Tutorial found on You Tube. The version of Python is 2.6.4 and the OS is Windows 10 64.bit.

Yesterday the tutorial face the creation of GUI.

The miminum instracion set is in a file:

   from Tkinter import *
   top = Tk()

Running this file in the Python shell of Windows a little window appares. Yestreday all was running correctly. The tutorial adds labels and button.

Today I restarted but running the same example the window does not apper.

Could you help me to understand what is wrong? Ther are some process open? I have to to some kind of restet.

Thank you

Upvotes: 0

Views: 166

Answers (1)

Niels Henkens
Niels Henkens

Reputation: 2696

You forgot to start the Tkinter GUI. You should add .mainloop() for that. So:

from Tkinter import *
top = Tk()
top.mainloop()

Upvotes: 1

Related Questions