Commit a4a8fa1d by BellCodeEditor

auto save

parent f31218ba
Showing with 7 additions and 3 deletions
......@@ -3,7 +3,8 @@ from tkinter import *
from tkinter import messagebox
import json
alist = []
alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"]
class Note(): # 便签、笔记
def __init__(self):
......@@ -85,6 +86,9 @@ def register(): # 注册验证
elif password1 != password2:
messagebox.showwarning("错误", "两次密码不一致!")
else:
user_info = {}
user_info["password"]=password1
user_info["pevent"]=["提1","提2"]
users[name] = password1
content = json.dumps(users)
with open("user.txt", "w", encoding="utf-8") as file: # "w"每次写入都覆盖原来的内容
......
{"admin": "admin", "python": "123456", "YTY": "YTY"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "TY": "YTY"}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment