|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- from tkinter import *
- import hashlib
- root = Tk()
- text = Text(root, width=20, height=5)
- text.pack()
- text.insert(INSERT, "I love FishC.com!")
- contents = text.get(1.0, END)
- def getSig(contents):
- m = hashlib.md5(contents.encode())
- return m.digest()
- sig = getSig(contents) #一到这里就各种报错
复制代码
请问怎么回事?
你试一下重新新建空白文档复制自己的代码看看有没有问题
- from tkinter import *
- import hashlib
- root = Tk()
- text = Text(root, width=20, height=5)
- text.pack()
- text.insert(INSERT, "I love FishC.com!")
- contents = text.get(1.0, END)
- def getSig(contents):
- m = hashlib.md5(contents.encode())
- return m.digest()
- sig = getSig(contents) #一到这里就各种报错
- mainloop()
复制代码
|
|