摘要:
1 #menu菜单组件 2 3 from tkinter import * 4 5 master=Tk() 6 7 def callback(): 8 print('你好咯!!') 9 10 m = Menu(master) 11 m.add_command(label='hello',command=callback) 12 m.add_command(lab... 阅读全文
posted @ 2017-04-27 23:24
道高一尺
阅读(496)
评论(0)
推荐(0)
摘要:
1 #自由绘制 2 from tkinter import * 3 4 master=Tk() 5 c=Canvas(master,width=400,height=200) 6 c.pack() 7 8 def paint(event): 9 print(event)#由此可见这里的点击事件其实返回的是一个坐标 10 #通过event获取具体坐标 11 ... 阅读全文
posted @ 2017-04-27 22:16
道高一尺
阅读(417)
评论(0)
推荐(0)
摘要:
1 from tkinter import * 2 import math as m 3 4 root = Tk() 5 6 w = Canvas(root, width=200, height=100, background="red") 7 w.pack() 8 9 center_x = 100 阅读全文
posted @ 2017-04-27 20:41
道高一尺
阅读(475)
评论(0)
推荐(0)
摘要:
1 #Canvas画布绘制矩形和线以及修改删除操作 2 from tkinter import * 3 4 master = Tk() 5 6 c = Canvas(master,width=400,height=200) 7 c.pack() 8 line1=c.create_line(0,100,400,100,fill='black') 9 line2=c.creat... 阅读全文
posted @ 2017-04-27 20:15
道高一尺
阅读(226)
评论(0)
推荐(0)
摘要:
1 #撤销操作 2 from tkinter import * 3 master = Tk() 4 #打开undo按钮 5 text=Text(master,width=30,height=5,undo=True) 6 text.pack() 7 text.insert(INSERT,'I love coding') 8 9 def show(): 10 text.e... 阅读全文
posted @ 2017-04-27 19:39
道高一尺
阅读(626)
评论(0)
推荐(0)
摘要:
1 from tkinter import * 2 3 master=Tk() 4 text=Text(master,width=30,height=5) 5 text.pack() 6 text.insert(INSERT,'I love coding!') 7 start='1.0' 8 9 def getIndex(text,inde): 10 return ... 阅读全文
posted @ 2017-04-27 16:28
道高一尺
阅读(234)
评论(0)
推荐(0)
摘要:
来源:http://www.cnblogs.com/superxuezhazha/p/5714970.html 阅读全文
posted @ 2017-04-27 14:09
道高一尺
阅读(281)
评论(0)
推荐(0)
摘要:
digest-MD5认证机制是基于MD5算法的LINUX安全机制认证。 会比较用户端传送的杂凑值与使用者密码的杂凑值,以认证用户端。 但由于此机制必须读取使用者密码,因此,所有想透过digest-MD5进行认证的使用者, 在目录中都必须要有{clear}密码。 将{clear}密码储存到目录时,透过 阅读全文
posted @ 2017-04-27 13:25
道高一尺
阅读(1443)
评论(0)
推荐(0)
摘要:
1 #检查文本 2 from tkinter import * 3 import hashlib 4 5 master=Tk() 6 text = Text(master,width=30,height=5) 7 text.pack() 8 text.insert(INSERT,'I love coding!') 9 content = text.get('1.0',END)... 阅读全文
posted @ 2017-04-27 13:16
道高一尺
阅读(231)
评论(0)
推荐(0)
摘要:
1 from tkinter import * 2 import webbrowser 3 4 master=Tk() 5 6 text=Text(master,width=50,height=20) 7 text.pack() 8 text.insert(INSERT,'I love FishC.com!') 9 text.tag_add('link','1.7','1.... 阅读全文
posted @ 2017-04-27 12:48
道高一尺
阅读(766)
评论(0)
推荐(0)