Python-s13 Operation-day4-Landing, management backstage

Source: Internet
Author: User

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


      1, user information: to save the file
2, permission verification, to use the adorner



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 (")
Print (line,end="")

Python-s13 Operation-day4-Landing, management backstage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.