Commit a542ed91 by BellCodeEditor

auto save

parent e406f1e5
Showing with 6 additions and 11 deletions
123,456,111456 {"用户名":"ehruibdn"}
111 {"密码":"17486872"}
python123 {"确认密码":"12794625"}
,123
,321
111
222
333
...@@ -4,8 +4,8 @@ def register(): ...@@ -4,8 +4,8 @@ def register():
password1 = d.get() password1 = d.get()
password2 = e.get() password2 = e.get()
print("用户输入的信息为:",name,password1,password2) print("用户输入的信息为:",name,password1,password2)
with open(r'C:\Users\Lenovo\Documents\level3-lesson17-diy1\1.txt','a',encoding='utf-8')as file: with open(r'C:\Users\Lenovo\Documents\level3-lesson17-diy1\1.txt','w',encoding='utf-8')as file:
file.write('%s\n%s\n%s\n'%(name,password1,password2)) file.write('{"用户名":"%s"}\n{"密码":"%s"}\n{"确认密码":"%s"}\n'%(name,password1,password2))
root=tkinter.Tk() root=tkinter.Tk()
screenwidth = root.winfo_screenwidth() screenwidth = root.winfo_screenwidth()
screenheight = root.winfo_screenheight() screenheight = root.winfo_screenheight()
...@@ -15,7 +15,7 @@ print(screenwidth,screenheight) ...@@ -15,7 +15,7 @@ print(screenwidth,screenheight)
root.title("window") root.title("window")
root.geometry("%dx%d+%d+%d" %(400,320,a,b)) root.geometry("%dx%d+%d+%d" %(400,320,a,b))
root.resizable(width=False,height=False) root.resizable(width=False,height=False)
c=tkinter.Entry(root,show=None,font=("宋体"),14,width=18) c=tkinter.Entry(root,show=None,font=("宋体",14),width=18)
c.place(x=130,y=60) c.place(x=130,y=60)
d=tkinter.Entry(root,show="*",font=("宋体",14),width=18) d=tkinter.Entry(root,show="*",font=("宋体",14),width=18)
d.place(x=130,y=100) d.place(x=130,y=100)
......
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