Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson17-diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a542ed91
authored
Aug 26, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
e406f1e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
1.txt
my_window.py
1.txt
View file @
a542ed91
123,456,111456
{"用户名":"ehruibdn"}
111
{"密码":"17486872"}
python123
{"确认密码":"12794625"}
,123
,321
111
222
333
my_window.py
View file @
a542ed91
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment