简体   繁体   English

Tkinter没有出现

[英]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. 我下载了Canopy,我想使用Tkinter ,为此,我禁用了pylab并运行了该程序,但仍然没有任何显示。 Additionally, I tried tkinter on jupyter and same problem. 此外,我在jupyter和相同的问题上尝试了jupyter

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. 我尝试使用简单的代码来查看GUI,但仍然没有任何反应。

You need to call mainloop() method at the end. 您需要在最后调用mainloop()方法。

import Tkinter as Tk

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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