您的位置:首页 > 编程语言 > Python开发

python这门功夫厉害归厉害,却也够邪气的(对双字节字符支持不是很好)

2008-01-18 00:49 239 查看
# -*- coding: utf-8 -*-

import os,sys
from Tkinter import *

def GetValue():
password=ent.get()
if password == 'Elaine':
button['bg']='yellow'
print 'hehe'
else:
ent.delete(0,END)
ent.insert(0,'wrong wrong wrong')



root = Tk()
root.geometry("150x100+400+200")

lab=Label(root,text='阿九,你文章写好没?')
ent=Entry(root,bg='white')
button =Button(root,text='Enter Password',command=GetValue)

lab.pack(ancho=W)
ent.pack(ancho=W)
button.pack(ancho=E)

root.mainloop()

研究了半天,终于找到方法了。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐