简体   繁体   中英

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.

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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM