教你怎么用Python Tkinter(TK)写一个HelloWorld

2024-11-11 15:43:54

1、小编这里使用PyCharm4作为IDE,Python版本2.7打开PyCharm,创建一个新项目。如果没有汉化的小伙伴,好样的,点击左上角File -> New Project

教你怎么用Python Tkinter(TK)写一个HelloWorld

3、选择好项目保存路径和解释器路径之后,我们点击Create创建。

教你怎么用Python Tkinter(TK)写一个HelloWorld

5、然后输入文件名点击OK即可。例如小编这里就叫Tk-HelloWorld

教你怎么用Python Tkinter(TK)写一个HelloWorld

7、按下F5运行,结果如图。

教你怎么用Python Tkinter(TK)写一个HelloWorld
猜你喜欢