ömer sarı ömer sarı - 18 days ago 8
Python Question

Tkinter does not show up

I downloaded Canopy and I would like to use

Tkinter
and for this, I disabled
pylab
and ran the program but still nothing showed up. Additionally, I tried tkinter on
jupyter
and same problem.

How can I make it work?

Here is my code :

import Tkinter as Tk

screen=Tk.Tk()
screen.title("Matplot Graphies")
screen.geometry("500x500")


I tried simple code to see GUI but still nothing happens.

Answer

You need to call mainloop() method at the end.

import Tkinter as Tk

screen=Tk.Tk()
screen.title("Matplot Graphies")
screen.geometry("500x500")
screen.mainloop()
Comments