PYTHON-S13 Operation-day4-Landing, management backstageRequirements:
This section of the job, the user management program:
Normal User:
Login, register, change password, view this user information
Admin User:
View all normal users, search for user information according to specified keywords;
Login, register, change password, view this user information;
Delete, add a normal user
Modify a normal user password
Increase Normal user permissions
Attention:
1, user information: to save the file
2, permission verification, to use the adorner
Ideas:
Readme:
Main program:Flowchart:in the course of writing homework, what you learned:
"Re.match: Look for lines that don't start with 1."
Import re
Open ("DBFile"):
If not Re.match ("1", line):
Print (line[:-1])
"Delete content as,permissionerror field "
lines = [l for l in open ( "R") if l.find ( "Permissionerror" )! = 0]
FD = open ( " File.txt " " W ")
Fd.writelines ( lines)
Fd.close ()
Enter the line number to delete the specified line
Import Fileinput
Input ("input delete num:")
f = fileinput.input ("DBFile",inplace=True)
In F:
If F.filelineno () = = num:
Print (")
Else
Print (line,end="")
Python-s13 Operation-day4-Landing, management backstage