Commit e795ca57 by BellCodeEditor

auto save

parent 55ffd1a7
Showing with 10 additions and 6 deletions
小兰:12本小丽:11本小丽:11本 123,456,111456
小丽:11本 111
小丽:11本 python123
,123
,321
111
222
333
...@@ -4,14 +4,13 @@ def register(): ...@@ -4,14 +4,13 @@ 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>','a',encoding='utf-8')as file: with open(r'C:\Users\Lenovo\Documents\level3-lesson17-diy1\1.txt','a',encoding='utf-8')as file:
file.write('%d'%name) 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()
a=(screenwidth-300)/2 a=(screenwidth-300)/2
b=(screenheight-300)/2 b=(screenheight-300)/2
print(300*300+a+b)
print(screenwidth,screenheight) 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))
......
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