#!/usr/bin/env python
import tkinter
top=tkinter.TK()
lable=tkinter.Label(top,text='hello,world')
label.pack()
tkinter.mainloop()
使用的是Python3.2 是因为版本不兼容哪出错了吗,运行时报错:
File "D:\eclipse\python\helloworld\src\test\e.py", line 4, in <module>
top=tkinter.TK()
AttributeError: 'module' object has no attribute 'TK'