Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson20-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
9c862d61
authored
Sep 09, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
0e1fa826
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
__pycache__/my_client.cpython-37.pyc
code.py
user.txt
__pycache__/my_client.cpython-37.pyc
0 → 100644
View file @
9c862d61
File added
code.py
View file @
9c862d61
import
tkinter
from
tkinter
import
messagebox
import
json
import
with
open
(
"user.txt"
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
info
=
f
.
read
()
...
...
@@ -40,6 +40,8 @@ def login(): # 登录验证
pwd
=
users
.
get
(
name
)
if
pwd
==
password
:
messagebox
.
showinfo
(
"成功"
,
"登录成功"
)
import
my_client
my_client
.
Note
else
:
messagebox
.
showwarning
(
"错误"
,
"用户名或密码错误!"
)
...
...
user.txt
View file @
9c862d61
{"admin": "admin", "python": "123456"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "\u4f60\u7239": "\u712f"}
\ No newline at end of file
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